I have an event called "crate" with a "action key" trigger and this code:
<>Move Event:: This Event (Ignore Impossible moves)
: :<>Move away from hero
<>Wait: 5 Frames
<>
How can i make it so that when it is in a certain spot, the value of a variable goes up?
The easiest way I can think of (but not the most efficient) is this:
Make 2 variables named obj X and obj Y
Make 2 variables named Destination X and Destination Y
Make a parallel process event, set objX and ObjY to the crate's x and y location (available in the variables panel).
Set dest. X & Y to the destination's X and Y values.
Conditional branch; if objx = dest.x; then if objy = dest.y, 'variable'='variable'+1
I think there's a much more efficient way of doing this, but just use that method until someone posts it here.
With events, no their is no better way. I just posted this too at the tutorials: puzzles thread.
still doesn't work. I'm gonna try in the scripts section.