- Joined
- Jul 6, 2014
- Messages
- 21
- Reaction score
- 2
- Primarily Uses
As the title says, I am looking for a way to pass a dynamic variable to $game_map.events[] so I can use it in a condition with changing event_ids.
The point is that I have multiple "enemy events" which can be killed if they touch another event which has to be activated by the player. A trap basically. If the player activates the trap event, the event_id is passed to a variable. If the enemy is near the trap (that part already works), it should check, if the event_id of the trap is the activated one, which was passed to the variable earlier.
This is the code I would use in a conditional branch, on the "enemy event" as a script, but I couldnt find a way to pass a variable:
$game_map.events[event_id].x - $game_map.events[My_Variable].x + $game_map.events[event_id].y - $game_map.events[My_Variable].y <= 1
Any idea?
Hope thats the right place, I am new to the forum...
The point is that I have multiple "enemy events" which can be killed if they touch another event which has to be activated by the player. A trap basically. If the player activates the trap event, the event_id is passed to a variable. If the enemy is near the trap (that part already works), it should check, if the event_id of the trap is the activated one, which was passed to the variable earlier.
This is the code I would use in a conditional branch, on the "enemy event" as a script, but I couldnt find a way to pass a variable:
$game_map.events[event_id].x - $game_map.events[My_Variable].x + $game_map.events[event_id].y - $game_map.events[My_Variable].y <= 1
Any idea?
Hope thats the right place, I am new to the forum...

