Need help using enemy IDs for conditional branches

Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
48
Reaction score
3
First Language
English
Primarily Uses
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
690
Reaction score
205
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

I have tried, several times to understand how Markiplier is popular. You can't deny his popularity. I can only get through a few minutes of his vids, though. He's cringier than ANY cringe comp I've ever watched. When I was a kid, if you acted like that, 0 friends and 100% no dates for you. Times have changed XD
Sometimes you may feel helpless and defeated. But everyone loses from time to time. It's okay to be tired. Take a breather. Have a good cry if you need to. You gotta take breaks from your workout, or you'll collapse before you can get stronger.
So, my roommates wrote a news article in English, translated it into Bengali with google translate and now I'm helping them fix the monstrosity which was the result. Making English the medium of education is fine... but not to an extent that we forget how to write properly in our own language :")
Stream will be live shortly with some more Minecraft spriting! Feel free to drop by~

Forum statistics

Threads
93,543
Messages
913,326
Members
123,067
Latest member
SehoraX
Top