Original Post
Hi, I was wondering if it is possible to make state based function calls in Angel script like we can in UT script or some other scripting languages that I have seen. If you are not familiar with what a state based call is let me show you a small example lets say we have a script as follows
float function1() { /// code code code // a state based call state_call function2() ; } float function2() { // code code code } void main() { function1() ; } basically what happens here is that when function1 calls function2, the stack used by function1 is discarded and only then is function2 called. This saves memory as is quite usefull in games. Can the stack of a function be discarded in anglescript either by calling another function or changing the calling convention in some way? Thanks, - Sid