_ReturnX and _ReturnY are where the "
Get natural target"
and "
Get entity direction"
store their results. Those commands don't do anything but update those variables. They aren't queryable. Also, keep in mind that _ReturnX, Y, are
global variables, so if two characters use these commands on the same turn, you can only use the latest result.
"
Return"
is used in conjunction with "
GoSub"
for modular scripting. Here's an example script:
Speech "1",Normal,Self,0,.
Speech "2",Normal,Self,0,.
GoSub Label
Speech "4",Normal,Self,0,.
Speech "5",Normal,Self,0,.
End
Label Label
Speech "3",Normal,Self,0,.
Return
This character will say 1 and 2. "
GoSub"
jumps him to the label, where he says 3. "
Return"
jumps him back to "
GoSub"
and the script continues on from there. It's surprisingly useful! I wish it was in DROD RPG!
Xindaris wrote:
Very good for recursion.
I see what you did there.
____________________________
spacelike
[Last edited by superluminal at 07-08-2017 05:33 PM]