Gigicom
Member
Hey,
I'm currently working on queued actions for NPCs.
For this, I'm using a priority queue and then add the action scripts to it. Then I have just one line of code that executes the most prioritized action script with script_execute
The problem is, that sometimes these action scripts need specific arguments. However, I can't just store a script like action(arg0, arg1) since that would just store the return value.
My question: Is it possible to store a script while keeping its arguments for later use? Or does anybody know an asset on the marketplace that can achieve this?
It would technically be possible to first somehow store the script and arguments in a list or in an array, however, that would require me to write multiple lines of code for every single action.
Thank you!
I'm currently working on queued actions for NPCs.
For this, I'm using a priority queue and then add the action scripts to it. Then I have just one line of code that executes the most prioritized action script with script_execute
The problem is, that sometimes these action scripts need specific arguments. However, I can't just store a script like action(arg0, arg1) since that would just store the return value.
My question: Is it possible to store a script while keeping its arguments for later use? Or does anybody know an asset on the marketplace that can achieve this?
It would technically be possible to first somehow store the script and arguments in a list or in an array, however, that would require me to write multiple lines of code for every single action.
Thank you!