[NEED HELP] Does Xon have some "on load" hook? - Printable Version +- Xonotic Forums (https://forums.xonotic.org) +-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3) +--- Forum: Xonotic - Configuration Tips (https://forums.xonotic.org/forumdisplay.php?fid=19) +--- Thread: [NEED HELP] Does Xon have some "on load" hook? (/showthread.php?tid=9975) |
Does Xon have some "on load" hook? - NAPALM - 01-18-2025 Hi, I'm currently working on some more advanced console coding stuff and I have ran into an issue. I currently do all my coding in autoexec.cfg, which works as expected when using simple stuff (defining variables and aliases that will be used later). However, when I try to run the aliases that I had defined just a couple lines before, it freaks out and breaks some stuff: Code: menu: program is not loaded These lines are repeated for each alias call. But when I rerun the script (or later exec a different cfg file) manually, there is no issue. It also gave me grief for using variables which I had not yet defined using the set command (even though their values should have been set using RPN), but I fixed that. This brings me to a possible solution - hijack some hook (the only one that currently comes to mind is cl_hook_gamestart_all) and let the code run from there. Which does work for the majority of my code, but for some things it is too late. Are there any hooks or aliases that are called after xon is loaded, before joining any game, that I could repurpose? |