goldberry Posted February 9, 2006 Share Posted February 9, 2006 Ok. I want both of these scripts to fire during conversations, if that makes any difference to them, can anyone write a working script for each? 1) The NPC uses a force lightning that will kill the entire party, resulting in game over. 2) An explosion will go off under the NPC (Plasma Mine or Thermal Detonator prefered). It will kill the NPC. Thank you for any help Link to comment Share on other sites More sharing options...
stoffe Posted February 9, 2006 Share Posted February 9, 2006 These are untested, but I think they should work as you described if you put them as the Action script of the dialog nodes where they should happen, provided that the dialog owner is the NPC in question: 1) The NPC uses a force lightning that will kill the entire party, resulting in game over. void main() { effect eBeam = EffectBeam(VFX_BEAM_LIGHTNING_DARK_L, OBJECT_SELF, BODY_NODE_HAND_LEFT); effect eVis = EffectVisualEffect(VFX_PRO_LIGHTNING_L); effect eHit = EffectForcePushed(); effect eDie = EffectDeath(); ClearAllActions(); PlayAnimation(ANIMATION_FIREFORGET_FORCE_CAST, 1.0, 3.0); int i; for (i = 0; i < GetPartyMemberCount(); i++) { object oParty = GetPartyMemberByIndex(i); DelayCommand(0.25, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oParty, 2.5)); DelayCommand(0.25, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oParty, 2.5)); DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHit, oParty, 0.1)); DelayCommand(1.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDie, oParty)); } } 2) An explosion will go off under the NPC (Plasma Mine or Thermal Detonator prefered). It will kill the NPC. void main() { effect eVisual = EffectVisualEffect( VFX_FNF_GRENADE_THERMAL_DETONATOR ); effect eKill = EffectDeath(FALSE, TRUE, TRUE); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVisual, GetLocation(OBJECT_SELF)); DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, OBJECT_SELF)); } Link to comment Share on other sites More sharing options...
goldberry Posted February 12, 2006 Author Share Posted February 12, 2006 Thank you! I'll test these two out as soon as I get home from my "holiday". I'll pass judgement as to whether I love you dearly or not tomorrow Link to comment Share on other sites More sharing options...
goldberry Posted February 13, 2006 Author Share Posted February 13, 2006 Yes! They worked, and worked well! If I wasn't making a private mod for a few friends, I'd release it just to show off . Just a note, I am making a private mod (for people I go to school with, about people I go to school with), if anyone thinks it would still be ok for me to release, I will. If only one or two think so, PM me, and i'll send it to you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.