Need help with boulder and switch puzzle :)

I made a boulder and switch puzzle. With a parallel process; when the boulder is standing on the switch it opens a door. It was successful using variables to check the position of boulder (35,28) but i wanted to simplify the event cause their will be many of those. I don't want to use variables for each one.

  • I tested with the hero and it works.. I've put this scipt in the conditional branch:        $game_player.x == 35 and $game_player.y == 28

  • But with the bouler (EVO21) it doesn't work! I've put this scipt in the conditional branch instead:         $game_map.events[021].x == 35 and $game_map.events[021].y == 28 



Do you know why? Thanks a lot   🙂

Here's a sceenshot of the event: 

[IMG]http://snag.gy/kIzSk.jpg[/IMG]
I've moved this thread to Ace support. Please be sure to post your threads in the correct forum next time. Thank you.

This has nothing to do with RGSS script support, because you aren't using scripts, you're using events only.
Check this tutorial, think it will help, particularly section 2.

http://finalbossblues.com/rmvxace-using-map-coordinates-p2/
You could use this. The only difference is that you have events with switches instead of a specific tile, but it will still work if you do everything that tutorial says.
This has nothing to do with RGSS script support, because you aren't using scripts, you're using events only.
Thanks Andar. And to be clear, should i understand that a script used in a conditional branch is considerent only event and no script for the purpose of the forum?
If you do it with event commands, it is not a script, even if you use a script within those event commands.


If you have to hit F11 and go into the REAL scripts to do it, THEN it's a script question 🙂
Check this tutorial, think it will help, particularly section 2.

http://finalbossblues.com/rmvxace-using-map-coordinates-p2/
 Thanks.. i already saw that tutorial and based my mechanic on it, but i needed to simplify it... it was made to introduce in going by exagerating complexity. Mine is two line long 😉 And it's working with the hero but not the other events. 
I saw your tutorial Shaz, and wondered at that time if it applied to my need.I think it's now time to go throught and read it fully 😉

But meanwhile, if someone can read and anwers personnally to my question instead of introducing me to an other of those great tutorials, but not specific to my problem, it would help a lot.

My event is two line long, and is working with the hero but not the other events 🙁 Why? Is there a probleme with the script.. or is it something else..

Thanks a lot to th 3 of you for your swift anwers and i'll keep you informed!! 
Try getting rid of the 0 at the start of the event id. Just use $game_map.events[21] instead of [021]


Also, you really don't need it to be a parallel process event. Those run EVERY frame, and you know that you REALLY only need to test the position of the boulder after it's moved, which will not happen every frame.


So you can put the test on the boulder instead of on the switch. In the event commands, put Move Away from Player, with a wait for completion, and then do the test. That means it will only run each time it moves, rather than every frame, even when it's not moving.
Nice! Thanks! I will need some days to test all the opportunities (i don't have much time, it's end of session in school), but at least i get some solid anwers there! 🙂
@Shaz!

GOOD NEWS.. removing the "0" in event script works! I thought to have try that a couple of times before but seeems not! So it works smootly now. 

For the parrallel process advise: geat ideal also 🙂  I did put a "wait 120 frames" command to slow the thing down, but i can do even better with your advise!

Now i need a tutorial to make some fragil things in the way of the boulders to break in their path!  But it's for an other topic.. 😛

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-boulder-and-switch-puzzle.51415/