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.
http://www.largedocument.com/3c8e0a49/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);