<- PRPL reference <- Vars and Functions
Arguments | Result | Notation |
---|---|---|
string | value | [ s1 - r1 ] |
Read variable with string name s1 from the global heap. Reads the contents of the global variable and pushes it to the stack. This allows dynamic reading of variables. Global variables can be accessed by any script on the map.
# In one script: 42 "myGlobalVariable" ->!* # In any script on the same map after that point: "myGlobalVariable" <-!* trace # Shows 42 in the debug window.
s1 = GetStringFromStack(); stack.Push(GameSpace.instance.globalHeap[s1]); stack.Push(new Data(0));