Help with Touching an Event

So I have an event that the Player walks over (red box) that makes an NPC appear in the green box if "Variable 5" is greater than or equal to 1. I want them to be able to put another npc in this stall and have that NPC appear in the blue box, if "Variable 5" is greater than or equal to 2.

The idea is that you've caught a bird and now you're putting it in a stall. So it's in the party, then I step on that event (red box), and the NPC is deleted from the party and appears in the green box. I want to be able to do that again, but have the second NPC be deleted and appear in the blue box.

1740871546339.png


The problem I'm having is that I don't know what kind of command to give it so that it only makes the NPC spawn in the blue box when I have a bird in my party the 2nd time. The reason I'm having trouble is because I'm using the SilvaCloneActor plugin, so I can't just say, "If bird actor is in party:" because it's not an ID or actor that's in the party, it's a variable. And I don't want the 2nd NPC to appear just because I stepped on the red square again with no requirements.

I REALLY hope that makes sense... and I'm sorry if it doesn't. But this is driving me crazy. I'm sorry that I ask for help so often on this forum but I really am trying to figure stuff out on my own before I get on here and start a new thread.
What exactly does the SilvaCloneActor plugin?
If it uses a specific variable value to determine the actor, can't you use this information to set up a condition?
What exactly does the SilvaCloneActor plugin?
If it uses a specific variable value to determine the actor, can't you use this information to set up a condition?
Sorry I'm not sure what you're asking but here is a link to the plugin's thread... https://forums.rpgmakerweb.com/index.php?threads/clone-actors.126263/
I don't expect many people to know this plugin.

But it basically says what I expected:
"Store the new actors ID to a game variable to use in future event commands or scripts."

Use this variable to check if your bird is in the party.

This is very theoretical, as I don't know your event or how the plugin works, but you'd do something like this, when you step on your red tile:

1740911964394.png


Personally I wouldn't recommend doing events like this on Hero Touch.
It opens up a lot of unintended behaviour. If you expect them to enter the cage, they could step on the red tile and go out instead. They could step on it twice. They could activate it when leaving instead of entering. Or they save inside the cage and do something weird in a new session. If players can break something, they will break it. Depends on how failsafe your event is.
Well I wanted to add a condition at the beginning that said "If __ is in the party" but I don't know how to figure out which ID the clone is using. I feel like adding that would make the event pretty solid
I skimmed the plugin code, and it seems, when you clone an actor, you select a variable, that will hold their ID.

Also, there has to be a place where you use the plugin command to add the clone to your party. At this moment, you could also activate a "Red clone" / "Blue clone" switch. Use that instead of "If x is in party".
Thank you so much for your help. I can't really think of another way to do this than by touch event. If I do a switch I'd have to do it for every possible combination of the variables as it's possible to catch more than two (I have 6 stalls and 2 of each bird can be put in them).
Let me ask the other way around:

Is the clone plugin in use? Does it work as intended in other parts of your game, so you're well aware of its features?

Or was it just an idea that this might solve your issue here and you didn't use it so far?
Yes it is in use. It works as intended. But I'm still fairly new to this so there might be information I'm not getting from the plugin that I would need.

Silva said in their thread for the plugin:
"The clone IDs will start from the number of actors you have in the database +1 and go up by 1 each time a new one is created. If there are any gaps made by deleting clones, new clones will fill the gaps. eg."
I see, so your issue is, that the clone IDs are dynamic.

But still, you select specific variables when you create your clones, right?
Like, you know, if Variable 123 contains the ActorID of a Red Bird? Or even a specific bird from a specific cage?
There has to be some point where the clones can be identified.

You can use a script line in a Conditional Branch to check if one of your party members has the Actor ID saved in variable 123. I think this should work:
JavaScript:
$gameParty.members().some(actor => actor.actorId() === $gameVariables.value(123))

Still a wild guess.
If this doesn't help, please share the events of your red, blue and green tiles, and the event you use the script call to create clones.

PS: Just to be sure - there is no such thing as "the NPC is deleted from the party and appears in the green box". You will have to create an eventpage for every existing bird and tell the game which one to display. Actors and Events are different kinds of game objects. You can't just put them there.
It deletes the Actor/Party Member and then puts an NPC in the stall that looks like the Actor/Party Member that was deleted.

Also I'm new to scripts, what information do I need to fill in besides the $gameVariables.value(123))?

Edit: Nevermind, I got it. Thank you so much for your help and for the script. Is it possible to do a range of variables with a script instead of just one variable?
JavaScript:
$gameParty.members().some(actor => [123, 124, 125, 126, 127].some(varId => actor.actorId() === $gameVariables.value(varId)))

Yes, this would check if at least one of the variables in the array [123, 124, 125, 126, 127] contains an actorID of your current party.
But it won't tell you which one, but just return true.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-touching-an-event.175920/