JoFlashStudios Posted May 11, 2011 Share Posted May 11, 2011 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. Does anyone know how to cast a friendly spell on yourself without becoming suicidal? 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 More sharing options...
TimBob12 Posted May 11, 2011 Share Posted May 11, 2011 Don't know if this will affect it or not but it is better to use object me = GetFirstPC(); Link to comment Share on other sites More sharing options...
JoFlashStudios Posted May 11, 2011 Author Share Posted May 11, 2011 I've changed it to GetFirstPC() for convention as you said, but there's no effect on the suicide attempts. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.