For examples of its use, try looking at the code in Team Deathmatch, Wrench Events or Portals.
To use this:
Use Find and Replace to replace "ArrayStackSO" with the name you want. ("TeamStackSO","pgunStackSO")
Create the scriptobject. (Replace
Bold with the name you find/replaced and the variable you will need later
$ReferenceToStack = new ScriptObject(){class = ArrayStackSO;count = 0;};
To add a value to the stack:
$ReferenceToStack.addValue("Hello"); //Adds the string as the first value
$ReferenceToStack.addValue(3); //Adds the number three as the second
$ReferenceToStack.addValue(%object); //Adds the variable or object as the third
To delete a value from the stack:
$ReferenceToStack.delValue(1); //The second value in the stack, "3", is deleted
$ReferenceToStack.delValueID("Hello"); //The first value which matches "Hello" is the first one in the stack. This is deleted.
To get a value from the stack:
echo($ReferenceToStack.getValue(0)); //Returns the first value in the stack, %object (The other two were deleted by the above)
Try using each of the above lines in the console. Use
$ReferenceToStack.dumpStack();
between each one to see what is currently in the stack so you have some idea of what is 'going on'.