lfnetwork.com mark read register faq members calendar

Thread: Explosion and death
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 05-25-2007, 09:37 AM   #1
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
Explosion and death

How do I make a person I talk to explode? For example:

- Help me! Please! [NPC]

- Calm down, the ship is under attack. We need to get out of here. [PC]

- Ok. Let's run to the.. AHHH (Make NPC explode and die) [NPC]

Edit: For K1

Last edited by Mindtwistah; 05-25-2007 at 10:05 AM.
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 09:46 AM   #2
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
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?

Master Zionosis is offline   you may: quote & reply,
Old 05-25-2007, 09:49 AM   #3
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
No, just a grenade effect.
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 10:02 AM   #4
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
I beleive something like this should work:

Code:
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.

Master Zionosis is offline   you may: quote & reply,
Old 05-25-2007, 10:05 AM   #5
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by master zionosis
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.

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

Last edited by stoffe; 05-25-2007 at 10:25 AM.
stoffe is offline   you may: quote & reply,
Old 05-25-2007, 10:16 AM   #6
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
Quote:
Originally Posted by stoffe
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.
Ohhh stoffe you do make me laugh sometimes, but now i have to give you my body

Master Zionosis is offline   you may: quote & reply,
Old 05-25-2007, 10:18 AM   #7
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
Quote:
Originally Posted by master zionosis
I beleive something like this should work:

Code:
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?
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 11:15 AM   #8
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
Quote:
Originally Posted by Mindtwistah
Do your mate know if there is such a script for K1?
That script should work for K1, afaik there is those effects in K1.

Master Zionosis is offline   you may: quote & reply,
Old 05-25-2007, 11:17 AM   #9
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
When I compiled it there was an error:

Error: To many arguments specified in call to "EffectDeath"
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 11:30 AM   #10
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
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.

Master Zionosis is offline   you may: quote & reply,
Old 05-25-2007, 11:36 AM   #11
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
Where do I put the fixed nwscript?
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 11:44 AM   #12
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
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.

Master Zionosis is offline   you may: quote & reply,
Old 05-25-2007, 11:56 AM   #13
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
When I compile, I get this:
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 11:57 AM   #14
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
I think you may have posted the wrong picture.

Edit: Well, have you added another script to the one i posted?

Master Zionosis is offline   you may: quote & reply,
Old 05-25-2007, 12:16 PM   #15
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
huh?
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 12:29 PM   #16
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
Have you edited the script i posted and added more functions to it?

Ignore my previous comment, the first time i saw your picture it was displaying a .dlg file, it's not now though.

Master Zionosis is offline   you may: quote & reply,
Old 05-25-2007, 12:41 PM   #17
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
No.
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 12:41 PM   #18
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by master zionosis
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:

Code:
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.
stoffe is offline   you may: quote & reply,
Old 05-25-2007, 12:44 PM   #19
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
Thank you master zionosis for giving me the script and thank you stoffe for correcting it. :P
Mindtwistah is offline   you may: quote & reply,
Old 05-25-2007, 12:45 PM   #20
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
Ohhh i did it again, it's the bloody "FALSE, TRUE, TRUE" bit, arggg, i swear I'm never giving scripting advice again *touch wood*, lol, well, i was partly there.

Master Zionosis is offline   you may: quote & reply,
Old 06-10-2007, 05:41 AM   #21
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
Is there a script like this so they don't die but dissapear? And if possible, with an ice grenade effect, like when you enter the rakatan mind prison.


Mindtwistah is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Explosion and death

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:03 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.