A avent touch other event and start conditions. How?

Hy, guys! How can I make one event touch other event and start a condition? The objective is use a "MOG HUNTER PICK AND THROW" plugin for atack enemies, like a Zelda with pot or Goofy Troop combat (SNES). The evenent A (barrel, pot or rock, anyway) touch a moving event B (enemy), an that way I will be make a demange in enemy using my event systens. The question is: how can I make a evento touch other evento and trigger conditions?...

Tnks, guys \o

Sem título.png
you don't.

by default there is no event-on-event trigger at all.

you can either use a parallel process to compare event position and react if they are identical, or you can use a plugin to add additional functions into the engine.

if I understand your picture correctly it is for a minigame and should be handled by parallel process
you can also check this plugin by [Galv_EventStartTypes].
and what happend if player colide to an event, event to player
or even to event.
I think the only action is:
// 0 - Player action
// 1 - Player collided with event
// 2 - Event collided with player

I need the Evenet colide Event :/

Btw, tnks man
I need the Evenet colide Event :/
as I explained in my post above, that does not exist.

you have to go through the other options we gave you
If I make the variables X and Y for the Event A and Event B registred, and put a Condition for this events variables have equal value, work. But especially Event A and B. In a battle, for exemple, the player have a various barrels (Event A) to attack a enemy (Event 😎. In this case, if a player miss the first attack, he will can't attack again. I will make a limited Events with parallel atcion for all barrels in the map. In case the player miss various attacks, the gameplay broke...


That's the problem with use variables with location condition
Event trigger event is prone to error so you won't find a lot of options. The issue occurs when the event triggers itself and causes an infinite loop or is triggered too many times by it's environment which causes a slower but still possibly game crashing memory leak.

I've released a limited scope event trigger event plugin for MZ and even that one can only be used in specific cases without causing an memory leak. Which is why you won't typically find this option in a plugin.
It's probably possible to do with RM in some way, but this type of mechanic is more suited for Pixel game maker, where you can set up collisions and hit boxes.
That's the problem with use variables with location condition
no - that is a problem with your way of using the coordinates.
events can be reset, and a parallel can check for more than two events to cross, and quite a number of other things.

it does mean that you can't use the most simple command sequence, but it doesn't mean that it never works - you just have to handle the event in the right way.
1650656881023.png

i didn't test that, but i think the logic is sound.

EDIT: Agh, i didn't change the events in the top part. make sure that's for each enemy and object that can interact.

in the actual enemy events have page 2 activate on S enemy 1 var of > 1 to initiate a death sequence, parallel to have it death anim with the player still able to do things, then page 3 just be a blank page, below characters.

looking at it, you may also need to put an if inside the ifs of if S enemy 1 Var is < 1, or it'll just up it by 1 every frame. so

if s enemy1 x = S item 1 x
if S enemy 1 y = S item 1 y
if S enemy 1 Var < 1
Control Variables: ......

just have to make that loop for each combination of enemy/item that can be possible in the mini game.

now that i think about it, it's vaguely reminiscent of a parallel to tell when to leave a town with a LOT of exit tiles. if player x = 0, if player y = 0, if player x = # if player y = #.
How can I make one event touch other event and start a condition? The objective is use a "MOG HUNTER PICK AND THROW" plugin for attack enemies, like a Zelda with pot or Goofy Troop combat (SNES). The event A (barrel, pot or rock, anyway) touch a moving event B (enemy), an that way I will make a damage in enemy using my event systems. The question is: how can I make a event touch other event and trigger conditions?...
As mentioned by @Tea's Jams this is no easy task to do. Especially without causing memory leakage or causing other issues. I've tried to code plugins for this a few times in the past and always had some issue come up.

However today to solve your issue I decided to take another try at it and believe I have some pretty good results ☺️

This time I have made the plugin that will run any code that you put into the triggering event.
Which seems most optimal.
This plugin also will have very minimal memory leak issue (shouldn't) as long as the inputted code is done correctly, but that will be up to you (the game designer).

To solve the issue of too many processes occurring at once like can happen by creating parallel processes or linking directly to an update function. The plugin I created will only check to run the code placed in the event's page upon the event "moveStraight" and also "updateJump" when the Jump has landed.

Also since you mentioned using MOG's Pickup & Throw plugin, I added compatibility for that.
I did have to overwrite the 'Game_CharacterBase.prototype.canPassThrow' function though to allow thrown events to actually hit/land on the target event though.



So make sure to place my plugin below MOG's Pickup & Throw plugin
1650691408129.png



Well without further ado..

I present to you my newest Event Trigger Event plugin MV:

Here's how to use it:
Setup:
Place the following notetag into an events notebox:
<eTrigger:true>
This can also be javascript such as: <eTrigger:$gameSwitches.value(1)>
That will only have the Event Trigger the "Event_Trigger" code if switch 1 is on

After placing the notetag then use the following comment setup: Event_Trigger: <**javascript code goes here*** />
Some very basic examples would be like the following:

Example #1:

Event_Trigger: <
$gameMap.eventsXyNt(x, y).forEach(function(event) {
event._triggeredBy = this;
$gameSelfSwitches.setValue([$gameMap._mapId, event._eventId, 'B'],true);
},this);
/>

The above code cycles though each events that is touched that are not using the "through" setting
It then assigns the event that is calling the code to the property "_triggeredBy" to the event
Then it turns on Self Switch "B" of that event

Example #2:

Event_Trigger: <
$gameMap.eventsXyNt(x, y).forEach(function(event) {
if ($dataMap.events[event._eventId].meta.targetEvent){
$gameSelfSwitches.setValue([$gameMap._mapId, event._eventId, 'B'],true);
};
});/>

The above code cycles though each events that is touched that are not using the "through" setting
If the "touched" event has a meta tag "targetEvent" then it turns on Self Switch "B" of that event
again this is only if it has the meta tag "targetEvent", like this <targetEvent:true> in the notebox

Example event(s):
Spoiler: Throwable Pot
1650689688113.png

The above code cycles though each events that is touched that are not using the "through" setting
If the "touched" event has a meta tag "targetEvent" then it turns on Self Switch "B" of that event
again this is only if it has the meta tag "targetEvent", like this <targetEvent:true> in the notebox

So when using something like this you will also need to have events that have a tag in the notebox <targetEvent:true>
Spoiler: Example of a "Target Event"
1650690376776.png

1650690949738.png

1650691030345.png
Spoiler: Orc Knight
1650690057051.png

The above code cycles though each events that is touched that are not using the "through" setting
It then assigns the event that is calling the code to the property "_triggeredBy" to the event
Then it turns on Self Switch "B" of that event
Spoiler: Game of Tag like in the Demo on the plugin page - Event Setup
1650700741240.png

1650700782227.png

1650700803367.png

Spoiler: Event Trigger Code
Event_Trigger: <
var event = $gameMap.eventsXyNt(x, y)[0];
if (!$dataMap.events[event._eventId].meta.noEventTrigger){
event._triggeredBy = this; $gameSelfSwitches.setValue([$gameMap._mapId, event._eventId, 'B'],true); $gameSelfSwitches.setValue([$gameMap._mapId, this._eventId, 'C'],false);
};
/>
Results look like this:

I might still add to this later too so it's kind of released but also still somewhat Beta :popcorn:
Well hope all this makes at least some sense lol... anyways let me know how it goes.
Hope all works out to suit your need. ☺️

Original thread: https://forums.rpgmakerweb.com/threads/a-avent-touch-other-event-and-start-conditions-how.146994/