RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

pushing blocks puzzle help

Started by gotix, December 28, 2006, 09:45:20 PM

0 Members and 1 Guest are viewing this topic.

gotix

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?

Reives

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.

Me™

With events, no their is no better way. I just posted this too at the tutorials: puzzles thread.
ALL HAIL ME™

gotix

still doesn't work. I'm gonna try in the scripts section.