skymen

Veteran
Veteran
Joined
Aug 26, 2013
Messages
46
Reaction score
5
First Language
French
Primarily Uses
I would like to (in the script) retrieve the data from the event (like its name, litle note/description box besid the name box) that called the plugin command.

For exemple, I want to create an event that would call some plugin command.

The plugin would would test if the value is, for exemple, 1, then it would set the event's local switch A to true.
If the value is 2, it would tp the event elsewhere

If the value is 3, it would damage the player, and so on.

I mean, making some auto event thing using plug-ins.

What I wanna make with this is create some "local variable" for each event, instead of using global variables.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,812
Reaction score
889
First Language
German
Primarily Uses
RMMZ
Plugin commands are resolved using GameInterpreter.prototype.pluginCommand. The GameInterpreter itself has the current even id as

Code:
this._eventId;this.eventId();
and the event itself as
Code:
$gameMap.event(this._eventId)
 

skymen

Veteran
Veteran
Joined
Aug 26, 2013
Messages
46
Reaction score
5
First Language
French
Primarily Uses
Thanks! :D
If I get some issue, I'll tell you :3


EDIT: OK, from there, how do I actually retrieve the event's name and note?
 
Last edited by a moderator:

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,812
Reaction score
889
First Language
German
Primarily Uses
RMMZ
You'll need to retrieve the actual event data first, like this:

Code:
var event = $gameMap.event(this.eventId()).event();var name = event.name;var note = event.note;
That's the intended version (i guess). For a bit less to write, you could also directly access the data object:
Code:
var event = $dataMap.events[this.eventId()];
 

Latest Threads

Latest Profile Posts

1638314262144.png
Didn't wanna spam the feed by posting Denzel's spritelayer separae, but I'm real happy with how this concept is coming along so wanted to share it, innit :D
EVXA wrote on Avery's profile.
Not sure how often you take time to play the games sent to you, but if you could give my game a shout & review on steam maybe that would be amazing, only if you like the game of course, I'd love to know which games have been your favorites over the years too.
I'm seeing my god daughter's school play next week. Being the mild agoraphobe I am this makes me nervous. Thus I had a dream that it was actually a plot by my best friend to take me clubbing at an establishment where it is customary to throw a harpoon at staff members to reward good service.
Praise be to the game make!
I need help on what I should add to this fighter game.
Should I add:
Rain
Sleet
Snow
Leaves
Wind
If you can come up with anything else let me know.

Forum statistics

Threads
117,089
Messages
1,104,479
Members
153,086
Latest member
LilithsRequiem
Top