Need help using enemy IDs for conditional branches

Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
91
Reaction score
14
First Language
English
Primarily Uses
RMMV
Hello,

I'm trying to make a skill that would call on a common event that would do something different depending what enemy was targeted, but based on the enemy ID rather than the troop index. I would imagine I could use the script call for the conditional trigger but I don't know what the code would be.

Is that even possible? If so, what would be the script to use? If not, any suggestions would be greatly appreciated.

Thanks in advance.
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
710
Reaction score
228
First Language
English
Primarily Uses
@Random Panda

Here's how I'd do it. First make a state, that is set to be 1000% added when the skill is used. Then you run the common event.
In the condtional branch script run this:
"$dataEnemies[x].isStateAffected(y)"
where x is the enemy id and y is the state.
After all the stuff you need for the common event is run.
Place a script call with this code:
"$dataEnemies[x].removeState(y);"

That should work, though let me now if it doesn't.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top