Jump to content

Home

Script issue with ActionCastSpellAtObject()


Recommended Posts

I'm having some issues with a script I'm trying to make. I want to activate a number of force powers on the current character, but I'm getting some very strange behavior. After casting each spell, my character attacks itself once or twice.

 

Untitled.png

 

Does anyone know how to cast a friendly spell on yourself without becoming suicidal? :p

 

Here's the code:

     object me = GetPartyMemberByIndex(0);
     ActionCastSpellAtObject(FORCE_POWER_FORCE_ARMOR, me, 0, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);      
     ActionCastSpellAtObject(FORCE_POWER_FORCE_IMMUNITY, me, 0, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
     ActionCastSpellAtObject(FORCE_POWER_KNIGHT_SPEED, me, 0, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);      

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...