Script that returns the Id of the actor that is being targeted by an enemy

Status
Not open for further replies.

RPG_itch_Studio

Veteran
Veteran
Joined
Jan 20, 2018
Messages
83
Reaction score
16
First Language
English
Primarily Uses
RMMV
Is there a script that returns the Id the actor that is being targeted (will be attacked) by an enemy?
I have the following action sequence for an enemy skill, but it is not working :

if BattleManager._action._targetIndex == 0
motion sleep: target
end
 

VeryXInh

Veteran
Veteran
Joined
Jan 7, 2019
Messages
90
Reaction score
115
First Language
Japanese
Primarily Uses
RMXP
Is there a script that returns the Id the actor that is being targeted (will be attacked) by an enemy?
I have the following action sequence for an enemy skill, but it is not working :

if BattleManager._action._targetIndex == 0
motion sleep: target
end
if targets[0].isActor() && targets[0]._actorId == 2
//code
end
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,354
Reaction score
8,533
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

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,072
Members
137,578
Latest member
JamesLightning
Top