How to link two events

haseo1997

Villager
Member
Joined
Nov 7, 2019
Messages
23
Reaction score
0
First Language
French
Primarily Uses
RMMV
Hi everyone,

I need some help. Here's my situation, I would like to link two events. The first one is a fight et the second one is the apparition of an NPC. What I want is that, when the fight is over, an NPC appears somewhere on the same map.

How can I do that?

Thank you :)
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
873
Reaction score
562
First Language
English
Primarily Uses
RMMV
Use switches. There's no concept of "linked" events, but you can make one event only appear when a switch is on, and a different event turns that switch on when you interact with it.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
It's simple. In event, when you battle something after winning use in third tab "Script..." event and type this:
Code:
$gameSelfSwitches.setValue([this._mapId, x, "A"], true);
now, replace x with id of event you want to "link"... this is how you obtain ID of an event

And finally you set your linked event like this.
 

haseo1997

Villager
Member
Joined
Nov 7, 2019
Messages
23
Reaction score
0
First Language
French
Primarily Uses
RMMV
It's simple. In event, when you battle something after winning use in third tab "Script..." event and type this:
Code:
$gameSelfSwitches.setValue([this._mapId, x, "A"], true);
now, replace x with id of event you want to "link"... this is how you obtain ID of an event

And finally you set your linked event like this.
Thank you. I did what you said but the Character that is supposed to appear doesn't :/

Here are my events:
https://i.imgur.com/0dqQ8tA.png
https://i.imgur.com/dATplcw.png

(sorry my game is in French)
 

haseo1997

Villager
Member
Joined
Nov 7, 2019
Messages
23
Reaction score
0
First Language
French
Primarily Uses
RMMV
I also added the mapId but it still doesn't work :/
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
839
Reaction score
467
First Language
Poland
Primarily Uses
RMMV
I doesn't work because you type wrong parameters. It should be:
Code:
$gameSelfSwitches.setValue([this._mapId, 9, "A"], true);
NOT ID:009 :)
 

haseo1997

Villager
Member
Joined
Nov 7, 2019
Messages
23
Reaction score
0
First Language
French
Primarily Uses
RMMV
I doesn't work because you type wrong parameters. It should be:
Code:
$gameSelfSwitches.setValue([this._mapId, 9, "A"], true);
NOT ID:009 :)
Thanks! But I found another way to do what I want using a switch ;)
 

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,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top