Storing the number of the Event ID into a variable

Sanguine

Hoot
Member
Joined
Oct 18, 2012
Messages
27
Reaction score
53
First Language
English
Primarily Uses
The title of the post says it. Is there a script call that I can use to do this? Or can I achieve this with events?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,483
Reaction score
987
First Language
English
Primarily Uses
You can reference an event's ID using a "script" event command by simply writing @event_id
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,241
Reaction score
6,783
First Language
German
Primarily Uses
RMMV
just remember that the events are map-based - on each map, the events have their ID numbers starting from 1 again.
 

Sanguine

Hoot
Member
Joined
Oct 18, 2012
Messages
27
Reaction score
53
First Language
English
Primarily Uses
But is there anyway I can get the actual number? Like the actual integer?
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
858
First Language
German
Primarily Uses
As i currently don't have access to RM, i don't know if there are any event commands you could use, but this snippet would do it:

$game_variables[<variable>] = event_idWhere "<variable>" is the id of the variable you want to set.
 

Sanguine

Hoot
Member
Joined
Oct 18, 2012
Messages
27
Reaction score
53
First Language
English
Primarily Uses
Thank you very much, it worked like a charm!
 

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

Latest Threads

Latest Profile Posts

Trading has been halted on the TSX (Canadian stock market) because of "technical issues". Suspicious... I'm bracing myself for a sea of red tomorrow lol
The Loco-Motion song pre-dates the dance. Meaning the lyrics are kinda misleading. "Everybody's doing a brand new dance now"... No they weren't, you just used peer pressure to trick everyone into going along with it.
Love it when someone confuses "RPG Maker (or script/plugin) has a bug" with "I didn't set it up right and it's not working as I want (or gives an error)"
Is animation really as hard as I think it is?
Out of sudden, snow. Everywhere.

Forum statistics

Threads
94,579
Messages
922,049
Members
124,446
Latest member
chungagunga
Top