The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: gotix on December 28, 2006, 09:45:20 PM

Title: pushing blocks puzzle help
Post by: gotix on December 28, 2006, 09:45:20 PM
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?
Title: Re: pushing blocks puzzle help
Post by: Reives on December 29, 2006, 02:44:38 AM
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.
Title: Re: pushing blocks puzzle help
Post by: Me™ on December 29, 2006, 11:15:41 AM
With events, no their is no better way. I just posted this too at the tutorials: puzzles thread.
Title: Re: pushing blocks puzzle help
Post by: gotix on December 30, 2006, 03:32:31 AM
still doesn't work. I'm gonna try in the scripts section.