RPG Maker Forums

So I was wondering... we can call a Common event from a Skill. Let's say we want to refer to a targeted enemy inside the common event of that skill and make a conditional branches and do stuff by probabilities and stuff.

How can I set a variable to contain the targeted enemy?

I know how to set a value to a specific variable, referring to it by its #id on the database (var).

$gameVariables.setValue(var, value);

What I don't know is how to set on value this:

value should be 0 if no enemy is selected or battle occurs (by default).
else
value becomes 1,2,3,4,5,or 6 according to the currently targeted enemy.

Remember, this script command will execute while a spell is cast thus the spell already has a target.
I WANT THAT TARGET VALUE! :p

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top