Let's say you make 4 NPC (A, B, C, D), and set them to walk randomly in one map.
And you want it so that when B, C, or D bumps/touches A, an event triggers.(even if you are not looking).
What kind of event? Well...for simplicity sake, let's say if B, C, or D bumps/touches A anytime during the game play, their self switches will set ON.
I do think that this could be done easily without script, just that I can't seem to find the answer after searching around. I could be wrong. So...any of you know how to do this?
Thanks !~~
Make an Event Triggers When 2 NPC Bumps Each Other
● ARCHIVED · READ-ONLY
-
-
Events cannot trigger other events. So yes, you need either a script, or a parallel process event checking the location and facing direction of every one.
If you're "not looking", that probably means they are off the screen, which means they will not be moving anyway, because of the built-in "don't process if not near the player" logic. -
One more info:
As Shaz said, event can't trigger other events in default, so you have to use a workaround.
However, there are several different workarounds, each with their own advantages and disadvantages. And because of this, you cannot "simplify":
If you tell us what you want to do, then we can point you to the correct workaround - and if the events should do different things, then most probably you'll need to handle the events with different workarounds depending on what they are supposed to do.What kind of event? Well...for simplicity sake, let's say if B, C, or D bumps/touches A anytime during the game play, their self switches will set ON.
And in some cases, you might even have to skip the idea - because some of the workarounds only work with a limited number of events (parallel processes checking a few dozen events could create lag that makes the game unplayable) -
There are 3 scripts that can work in conjunction to achieve this:
- Moghunter's anti-lag script
- Events move offscreen script (can't remember who made this)
- Galv's move route commands where events can trigger other events -
Why would you combine an anti-lag script (that stops events moving when they're offscreen) with a script to allow events to move when they're offscreen?
-
I think I know what he's about - a good anti-lag script allows you to decide which events will be updated even when outside the screen, and that can override the default mechanism to stop updating in a distance.
However, that means you have to be more careful with selecting and configuring the anti-lag, because not every antilag script can be used that way. -
This xDI think I know what he's about - a good anti-lag script allows you to decide which events will be updated even when outside the screen, and that can override the default mechanism to stop updating in a distance.However, that means you have to be more careful with selecting and configuring the anti-lag, because not every antilag script can be used that way.