<- PRPL reference <- Vars and Functions
Arguments | Result | Notation |
---|---|---|
none | value | [ - r1 ] |
Pushes the value of global variable VARNAME to the stack. If that variable does not exist, 0 is pushed to the stack instead. 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 = command.data.GetString(); stack.Push(GameSpace.instance.globalHeap[s1]); stack.Push(new Data(0));