This might be in the JK Specs or DataMaster...but I didn't see it and this is the first I've found of it so I'm posting here.
While writing my AI cog, which I've been trying to compartmentalize into tons of small 'functions' (message calls) to avoid redundant code...I appear to have run into a limit for nested message calls. After debugging my code excessively, I finally tracked it down. It was mind numbing because I didn't know about this and the 'function' was working fine in all other parts of code so therefore I did not suspect it.
pulse calls a message I created called offense. Offense calls movetotarget which in turn calls checkmove which in certain conditions calls strafe. Strafe then attempts to call a generic pathfinding message, checkdepth and fails to do so.
Pulse -> offense -> movetotarget -> checkmove -> strafe -> (fail 6)checkdepth
Thus the limit appears to be 5 message call depth...well, that is if you count the inital message. I don't know if this applies differently when using game messages or made up messages like I have, but I suspect there is no difference.
This is only mildly annoying now that I know about it since I'll just have to rework things a bit. But I was going insane because I couldn't see why it was failing!
Just an FYI in case you didn't know.
While writing my AI cog, which I've been trying to compartmentalize into tons of small 'functions' (message calls) to avoid redundant code...I appear to have run into a limit for nested message calls. After debugging my code excessively, I finally tracked it down. It was mind numbing because I didn't know about this and the 'function' was working fine in all other parts of code so therefore I did not suspect it.
pulse calls a message I created called offense. Offense calls movetotarget which in turn calls checkmove which in certain conditions calls strafe. Strafe then attempts to call a generic pathfinding message, checkdepth and fails to do so.
Pulse -> offense -> movetotarget -> checkmove -> strafe -> (fail 6)checkdepth
Thus the limit appears to be 5 message call depth...well, that is if you count the inital message. I don't know if this applies differently when using game messages or made up messages like I have, but I suspect there is no difference.
This is only mildly annoying now that I know about it since I'll just have to rework things a bit. But I was going insane because I couldn't see why it was failing!
Just an FYI in case you didn't know.
-El Scorcho
"Its dodgeball time!" -Stormy Waters
"Its dodgeball time!" -Stormy Waters