Jump to content

Home

Script a Force Power Attack on PC and partymembers


Miltiades

Recommended Posts

I want an NPC to stun my PC and partymembers using a script. I found this thread, but the script needs some adjustments so that the NPC attacks the PC and the custom partymembers. Could someone help me with that?

 

Do you want the NPC to actually cast one of the standard Stun/Stasis force powers on the party like if it was in combat, or do you want to make it look like they are using a force power but really apply a scripted effect instead?

Link to comment
Share on other sites

I think the latter. What I want is when the NPC and the PC are in a conversation, after the conversation, the NPC stuns the PC and the partymembers, walks away and closes the door behind him. It's just to get the idea that the PC and the partymembers can't follow the NPC.

Link to comment
Share on other sites

I think the latter. What I want is when the NPC and the PC are in a conversation, after the conversation, the NPC stuns the PC and the partymembers, walks away and closes the door behind him. It's just to get the idea that the PC and the partymembers can't follow the NPC.

 

The scripts in the thread you linked to should do just that if I understand you correctly. What other than that are you asking for?

 

If it's adapting it to be used against the whole party you could just repeat applying the stasis effect for each party member, like:

 


void ST_StasisParty();

void main() {
   object oJedi2 = GetObjectByTag("jedi2");

   AssignCommand(oJedi2, ClearAllActions());
   AssignCommand(oJedi2, ActionCastFakeSpellAtObject(FORCE_POWER_HOLD, GetFirstPC()));
   AssignCommand(oJedi2, ActionDoCommand( ST_StasisParty() ));
   AssignCommand(oJedi2, ActionDoCommand(SetCommandable(TRUE)));
   SetCommandable(FALSE, oJedi2);
}

void ST_StasisParty() {
   effect eStasis = EffectCutSceneParalyze();
   eStasis = EffectLinkEffects(eStasis, EffectVisualEffect(VFX_DUR_HOLD)); 
   int iIdx;
   for (iIdx = 0; iIdx < GetPartyMemberCount(); iIdx++) {
       ApplyEffectToObject(DURATION_TYPE_PERMANENT, eStasis, GetPartyMemberByIndex(iIdx));
   }
}

Link to comment
Share on other sites

The problem is that I want the NPC to stun the partymembers who're with the PC, whomever they are. In the module I'm working in, you can choose who you take with you. So I can't just fill in a name if (s)he isn't with the PC.

 

For example, if I fill in Atton and Visas as the tags in the script, and I haven't chosen them for this trip, then the partymembers I did took with me won't be stunned.

 

Edit: Ah, I'll try that script you added.

Link to comment
Share on other sites

It doesn't work. The NPC doesn't do anything after the conversation. I've filled in the name of the script into the script field of an empty entry node, after an entry node with text. Anything I may have missed?

 

Did you change the tag in the script to the tag of the NPC that should use the "force power" on the party?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...