I'm experimenting with the software and I'm not sure how I can make two uncontrolled NPCs interact by touching. I'm not sure if it is even possible, but I just wanted to make an area with NPCs that talk when they run into each other.
Interacting NPCs
RPG Maker VXAce SupportHow do they "run into each other"? Do you have them on set move routes, or are you using a move route within an event to move each of them, or are they moving randomly?
Events interact to the player, not to other events.
Events interact to the player, not to other events.
They move randomly. I wasn't sure if it was even possible. I just got RPG Maker today.
Events cannot trigger other events.
However, this is usually not neccessary because in most cases, there is no need for events to trigger another, events can command another when they're triggered by the player.
If you give us a better description of what you want to achieve in the game, then we can tell you how to do that.
However, this is usually not neccessary because in most cases, there is no need for events to trigger another, events can command another when they're triggered by the player.
If you give us a better description of what you want to achieve in the game, then we can tell you how to do that.
Giving NPCs schedules and making them 'talk' to one another is actually very, very time consuming, as well as complicated. If you just got RPG Maker today, I wouldn't dream of attempting it.
You can compare two event's positions and create conditions for when they are touching each other. One way of doing this is through a Script Call on a "parallel process" event. For example, use this code:
if $game_map.events[1].x == $game_map.events[2].x if $game_map.events[1].y == $game_map.events[2].y - 1 $game_switches[1] = true end if $game_map.events[1].y == $game_map.events[2].y + 1 $game_switches[1] = true endendif $game_map.events[1].y == $game_map.events[2].y if $game_map.events[1].x == $game_map.events[2].x - 1 $game_switches[1] = true end if $game_map.events[1].x == $game_map.events[2].x + 1 $game_switches[1] = true endendIn this case, when events 1 and 2 touch each other, the switch 1 will be activated. Just change the numbers to match your event's IDs and the switch you want to use.
if $game_map.events[1].x == $game_map.events[2].x if $game_map.events[1].y == $game_map.events[2].y - 1 $game_switches[1] = true end if $game_map.events[1].y == $game_map.events[2].y + 1 $game_switches[1] = true endendif $game_map.events[1].y == $game_map.events[2].y if $game_map.events[1].x == $game_map.events[2].x - 1 $game_switches[1] = true end if $game_map.events[1].x == $game_map.events[2].x + 1 $game_switches[1] = true endendIn this case, when events 1 and 2 touch each other, the switch 1 will be activated. Just change the numbers to match your event's IDs and the switch you want to use.
I may be wrong about this, but can something like this not be solved using the 'event touch' trigger?
So by having text show up in the form of custom balloon icons (not ideal I know).
You could have a switch turn on when the events touch, then have the icons/text appear and have the switch turn off again, allowing the event page to revert back to the autorun page?
I'm not too clear on how the autorun events work though, so I'm not sure if it will allow the event touch page to activate or not.
So by having text show up in the form of custom balloon icons (not ideal I know).
You could have a switch turn on when the events touch, then have the icons/text appear and have the switch turn off again, allowing the event page to revert back to the autorun page?
I'm not too clear on how the autorun events work though, so I'm not sure if it will allow the event touch page to activate or not.
Original thread: https://forums.rpgmakerweb.com/threads/interacting-npcs.40601/