So, I'll make this short.
I have two events next to each other, and one is supposed to trigger the other.
Problem is, the first one isn't allowed to move to do so, and when I say 'move route - move up - skip', the event just skips the move route and nothing happens.
The player is ALSO standing next to the first event, making it so that the event has no move room.
Another solution would be to change the other event's self switches. the problem with that is that I'd need to copy those two events again and again, and as such cant (easely) use the event's id.
So, I'd need a method to change a events self switch BY COORDINATE.
To do so, I use this piece of code:
The @map_id calls the current map, the $game_map.event_id_xy(x,y) gets the event at the coordinates x and y.
Since I need the event above the event that is activated, I use relative coordinates. The '-' is there because in the RPGMaker y is counted up while going downwards.
Lastly, the self switch has to be in brackets, while the value has to be without.
I have two events next to each other, and one is supposed to trigger the other.
Problem is, the first one isn't allowed to move to do so, and when I say 'move route - move up - skip', the event just skips the move route and nothing happens.
The player is ALSO standing next to the first event, making it so that the event has no move room.
Another solution would be to change the other event's self switches. the problem with that is that I'd need to copy those two events again and again, and as such cant (easely) use the event's id.
So, I'd need a method to change a events self switch BY COORDINATE.
To do so, I use this piece of code:
Ruby:
$game_self_switches[[
@map_id,
$game_map.event_id_xy(
$game_map.events[@event_id].x,
$game_map.events[@event_id].y - 1),
'A']] = true
The @map_id calls the current map, the $game_map.event_id_xy(x,y) gets the event at the coordinates x and y.
Since I need the event above the event that is activated, I use relative coordinates. The '-' is there because in the RPGMaker y is counted up while going downwards.
Lastly, the self switch has to be in brackets, while the value has to be without.