I've been over Despain's tutorial and some others, but I'm at a loss for what I'm doing wrong.
The idea is to have a "pressure plate" switch that will respond to either the player standing on it, or the player pushing a movable empty treasure chest on top of it. Once I can get the first one to work, I'll duplicate it.
Right now the switch responds when the player stands on it, but not when the player moves the box onto it.
The box looks like this: http://imgur.com/fE4lwc4 http://imgur.com/fVyHqoU
The switch looks like this: http://imgur.com/RnR0zCP http://imgur.com/03Bi9p2
The conditional branch lines are cut off in the picture. In the first page, they are:
$game_player.x == $game_map.events[@event_id].x and $game_player.y == $game_map.events[@event_id].y
and
$game_map.events[022].x == $game_map.events[@event_id].x and $game_map.events[022].y == $game_map.events[@event_id].y
In the second page they are:
$game_player.x == $game_map.events[@event_id].x and $game_player.y == $game_map.events[@event_id].y
and
$game_map.events[022].x == $game_map.events[@event_id].x and $game_map.events[022].y == $game_map.events[@event_id].y
Can anyone tell me why this isn't working?
Sliding block pressure switch ignoring moving object
● ARCHIVED · READ-ONLY
-
-
got a link to the tutorial?
Try changing $game_map.events[022] to $game_map.events[22] and see if it makes a difference -
That did it. Thanks. (Go figure, though.)
Here's the tutorial I was basing it on.
http://finalbossblues.com/rmvxace-using-map-coordinates-p2/ -
yeah, lots of things don't work properly when you use leading zeros in scripts. Apparently it's not always bad, but better to just not do it.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.