[Dev] Unique Event Interaction depending on how it's triggered

The video demonstrates the plugin idea.


We have different ways to interact with an event: press a button, press a different button, use an item on the item, use a skill on the item, etc.


Depending on how you choose to interact with it, or *what* interacts with it, the event will do something different.
so, what you set the event trigger in editor?


player touch, parallel?
so, what you set the event trigger in editor?


player touch, parallel?
Action Trigger.
Hime, there is a small issue with the trigger label.

This event will only ever trigger the 'trigger label' once... After which its ignored.

15_1212_triggerLabel_issue_1.PNG

The self switch triggers the next page (parallel process) after its done, self switch is turned OFF, and default interaction triggers normally.

But the trigger label becomes non-responsive.

edit:

In contrast, this event works all the time. No issues.

15_1212_triggerLabel_issue_1b.PNG
The self switch triggers the next page (parallel process) after its done, self switch is turned OFF, and default interaction triggers normally.

But the trigger label becomes non-responsive.

edit:

In contrast, this event works all the time. No issues.

attachicon.gif
15_1212_triggerLabel_issue_1b.PNG
Hmm, this is because I'm storing trigger labels with the EVENT, and not with the page.

When a new page is loaded, it clears out the old triggers to prepare for the new ones.

However, trigger labels are only loaded if the page hasn't had its list modified yet, and when you go back to another page that was already loaded, it won't load it again.

So the triggers were cleared out due to page switching, but they aren't reloaded back in when you go back to an old page.

But this has uncovered another potential issue. When you have an autorun event, it repeatedly causes the "start" method for the event to run.

Because of this:

Game_Event.prototype.checkEventTriggerAuto = function() { if (this._trigger === 3) { this.start(); }};So even if you were in the middle of the event, it would just keep going "start start start start start"Not sure if this might be a problem.

Original thread: https://forums.rpgmakerweb.com/threads/dev-unique-event-interaction-depending-on-how-its-triggered.52714/