Edit: Through alot of confusion and miscommunications, I think it is better to rewrite the question entirely! Essentially I want to store predefined variables for a methods arguments inside an unrelated (not same namespace etc.) class, and call said method with said arguments from said unrelated class.
The idea: In many RTS games, like Star Craft, you can stack unit orders. I want to do this aswell. The problem isn’t stacking AI actions, but rather storing their arguments.
Here is a quick example:
You click somewhere, the AI walks there. In my AI this is a method called GoToThisLocation.
You shift-click somewhere and the AI will walk to all of the clicked points, in order. This is what I want to do better. Right now it stores a list of Vector3s and an index int and all that in the main AI script.
I already have a script which keeps track of the AIs stacked behaviours, so I thought it would be a neat idea to store the list of Vector3s inside this script, which works dynamically. What I mean is this script is supposed to work for everything, so hardcoding in a list of specifically Vector3s wouldn’t be ideal.
Problem number one is to store any type of argument in the standalone dynamic script, so it would still work for any type of script.
This script also calls the methods of the main AI script automatically, so I also need to know how to invoke a method cross-classes with arguments.
Edit: It works flawlessy! Thanks alot guys!