Jump to content

Home

Explosion and death


Recommended Posts

Are you actually trying to make the NPC blow up (in a not so pleasant but easier way of explaining it) blowing all the NPC's body parts off or something, something which i can no doubt bet my entire body you cannot do, or are you trying to just make an explosion effect, a bit like a grenade over the NPC and then he dies?

Link to comment
Share on other sites

I beleive something like this should work:

 

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));
}

 

Let me know, i haven't tested it but according to my mate it does. :)

Link to comment
Share on other sites

Are you actually trying to make the NPC blow up blowing all the NPC's body parts off or something, something which i can no doubt bet my entire body you cannot do

 

It could probably be done, though it would no doubt look more amusing than dramatic, and would require a lot of work for such a small thing. :)

 

You could make multiple copies of a body model and make all of it transparent/invisible except for one body part... then when the creature "explodes" you remove it and spawn in the multiple creatures each only having one body part visible, force push them around and then "kill" them. :nutz3:

 

Edit: You may keep your body, I think I'll only need one, and I already have that. :p

Link to comment
Share on other sites

It could probably be done, though it would no doubt look more amusing than dramatic, and would require a lot of work for such a small thing. :)

 

You could make multiple copies of a body model and make all of it transparent/invisible except for one body part... then when the creature "explodes" you remove it and spawn in the multiple creatures each only having one body part visible, force push them around and then "kill" them. :nutz3:

 

Ohhh stoffe you do make me laugh sometimes, but now i have to give you my body :headbump

Link to comment
Share on other sites

I beleive something like this should work:

 

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));
}

 

Let me know, i haven't tested it but according to my mate it does. :)

 

Do your mate know if there is such a script for K1?

Link to comment
Share on other sites

Ok, this an example:

 

I use nwnnsscomp application, i created a folder, for this example, my folder is here

 

"C:/SWKotOR Mod Apps/Script Compiling/" then in here you place the fixed nwscript and the 2 vital programs to compile the script "nwnnsscomp.exe" and "_CompileAll.bat", also in the "Script Compiling" folder you must create an "Override" folder and place your .nss scripts in there, and then go back a folder and double click the "_CompileAll.bat", then you should get the box that tells you the status of the compile, then back in the Override folder you made you should have 3 files, the original .nss the new .ncs and the last and not needed .ndb.

Link to comment
Share on other sites

Well, that function is in KotOR 1, I'm not sure why it isn't compiling, when i tried it without the fixed nwscript it didn't work but with the fixed nwscript it compiled, if you download the fixed nwscript here, it should then compile without errors.

 

The EffectDeath() function exist in KOTOR 1, but it has one less parameter than in TSL. In TSL the third parameter can be set to prevent the victim's corpse to fade away like it usually does after a few seconds after someone is killed. In KOTOR 1 you'll have to set that separately. Like:

 

void main() {
   effect eVisual = EffectVisualEffect( VFX_FNF_GRENADE_THERMAL_DETONATOR );
   effect eKill = EffectDeath();

   SetIsDestroyable(FALSE);
   ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVisual, GetLocation(OBJECT_SELF));
   DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, OBJECT_SELF));
}

 

If you try to compile a script using three parameters to EffectDeath() for KOTOR 1 it will fail since it won't match the function signature in that version of NWScript.

Link to comment
Share on other sites

  • 3 weeks later...

Archived

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

×
×
  • Create New...