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 Posts

Latest Profile Posts

Another thumb update. The nail is beginning to break away, along with the aforementioned hard and blackened dead skin. The final join has regained some of its flexibility, tho it's a bit stiff after being held still for so long. The very tip of my thumb has a strange dry and somewhat tingly feeling to it when I touch it to something, but at least it isn't numb. I am so ready for this to be over. :o
Can I get away with calling a "shortsword" a dagger and not a sword?
So here's the full cycles, I'm not so familiar with actually animating and giving motion so any observation on that matter would be really helpful! :kaoswt:
EfGHbLh.gif

Just now I realized I didn't scale it up so its smol...
I wanna make a YouTube video about reviewing a game, but I don't know what RPG Maker game I should play...
Guarii wrote on TSR's profile.
I want to create a OneShot style inventory. Without having the weapons and armor sections. Just the items. How can I do this?
images

Forum statistics

Threads
118,705
Messages
1,118,056
Members
155,834
Latest member
Amaginus
Top