Make an Event Triggers When 2 NPC Bumps Each Other

metronome

Veteran
Veteran
Joined
Aug 21, 2014
Messages
338
Reaction score
144
First Language
English (Sure!)
Primarily Uses
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 !~~
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
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":

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.
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.


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)
 

EternalShadow

Veteran
Veteran
Joined
Sep 16, 2012
Messages
5,781
Reaction score
1,041
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
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.
 

EternalShadow

Veteran
Veteran
Joined
Sep 16, 2012
Messages
5,781
Reaction score
1,041
First Language
English
Primarily Uses
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 xD
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top