Live nade spawn?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Live nade spawn?

Post by lizardkid »

How do i spawn a live nade? i have an anim i'd rather have an AI use to throw his nade around a corner, and i need to make a nade actually throw.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

u wont be able to spawn one that is being thrown.

u can spawn one that will explode. and u can make explode.


luckily u get to script the chuck part urself.

global/greneade_throw.scr - something like that. That might help.

then anim fire or explode will make it well..explode.
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

so spawn a grenade with velocity etc and tell it

Code: Select all

$grenade anim explode
???
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Projectile class entities have an 'explode' method. Therefore:

Code: Select all

$grenade explode
They also explode if you simply remove or delete them.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

wouldnt of thought they explode when u remove them:S..odd. maybe cos their life ran out.

yeah. the nades dont have any anims :S.

So ?blah explode would make it explode. Dont know it would lok the same though, and in the past it doesnt remove the entity just makes it go bang.

first ai_event grenade 384?

anyway why cant u just make the AI chuck it themselves? u ccud make custom anims chuck a nade.
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

When a projectile's life runs out it's removed and its explosion effect is spawned. That's why it explodes when you remove it.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

anyway why cant u just make the AI chuck it themselves? u ccud make custom anims chuck a nade.
Because the try_throw_grenade.scr only supports the standing toss, not the around hte corner toss i need. so i'm just doing it myself.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

rookie. u re-write everything i say in forums:S:S

anyway..ja. ok. good luck
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Elgan wrote:rookie. u re-write everything i say in forums:S:S
Am I? Show me an example.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

lol nm.

whats "bottle" in polish:P
Post Reply