Greetings
I need that when event A passes close to event B, event B behaves differently.
Specifically, event B is fixed, and A is an event that only travels one route. When the distance between A and B (the hypotenuse of the triangle formed by this distance and the coordinate axis) is less than 5.0, event B must call a common event.
Event B needs to do the same thing for many other events besides A. I use Yanfly's Event Spawner Plugin (http://www.yanfly.moe/wiki/Event_Spawner_(YEP), and it creates all the events that the B must react. If the distance from event A is greater than 5.0, it tries again for the next event, and so on. If he tries everyone and everyone is out of range, he starts over and checks if event A is back in range.
The events created by this plugin start with the ID 1000, so all "type A" events will have this ID or greater. Some useful commands are:
$gameMap.FirstSpawnedEvent()
- This will grab the first available spawned event as an object.
- If the first event has been despawned, the next on in the list will be returned as an object. If there are no spawned events left, this script call will return an undefined value.
$gameMap.FirstSpawnedEventID()
- This will grab the first available spawned event's ID as a number.
- If the first event has been despawned, the next on in the list will be returned as a number. If there are no spawned events left, this script call will return a value of 0.
$gameMap.LastSpawnedEvent()
- This will grab the last available spawned event as an object.
- If the last event has been despawned, the previous event in the list will be returned as an object. If there are no spawned events left, this script call will return an undefined value.
$gameMap.LastSpawnedEventID()
- This will grab the last available spawned event's ID as a number.
- If the last event has been despawned, the previous event ID on in the list will be returned as a number. If there are no spawned events left, this script call will return a value of 0.
I need that when event A passes close to event B, event B behaves differently.
Specifically, event B is fixed, and A is an event that only travels one route. When the distance between A and B (the hypotenuse of the triangle formed by this distance and the coordinate axis) is less than 5.0, event B must call a common event.
Event B needs to do the same thing for many other events besides A. I use Yanfly's Event Spawner Plugin (http://www.yanfly.moe/wiki/Event_Spawner_(YEP), and it creates all the events that the B must react. If the distance from event A is greater than 5.0, it tries again for the next event, and so on. If he tries everyone and everyone is out of range, he starts over and checks if event A is back in range.
The events created by this plugin start with the ID 1000, so all "type A" events will have this ID or greater. Some useful commands are:
$gameMap.FirstSpawnedEvent()
- This will grab the first available spawned event as an object.
- If the first event has been despawned, the next on in the list will be returned as an object. If there are no spawned events left, this script call will return an undefined value.
$gameMap.FirstSpawnedEventID()
- This will grab the first available spawned event's ID as a number.
- If the first event has been despawned, the next on in the list will be returned as a number. If there are no spawned events left, this script call will return a value of 0.
$gameMap.LastSpawnedEvent()
- This will grab the last available spawned event as an object.
- If the last event has been despawned, the previous event in the list will be returned as an object. If there are no spawned events left, this script call will return an undefined value.
$gameMap.LastSpawnedEventID()
- This will grab the last available spawned event's ID as a number.
- If the last event has been despawned, the previous event ID on in the list will be returned as a number. If there are no spawned events left, this script call will return a value of 0.