OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Padiimiite on 06 Jan 2003, 02:53:51

Title: Grenade Chucker
Post by: Padiimiite on 06 Jan 2003, 02:53:51
Ok, what Im trying to accomplish here is to have a civ'y armed with a handgrenade lob it into a group of soldiers. Now I can get him to throw the grenade but I can't get him to throw it at the soldiers. I tried using DoFire, but that only seems to work with guns.

One more thing, when I CamCreate bombs, like a "laserguidededbomb" .etc, can I CamCreate a grenade and get it to go off? I've tried and it doesn't work. I want my soldiers tripping over mines and stuff, but I don't want explosions so big that they take out the entire squad. But it is funny watching them go flying across the screen.
Title: Re:Grenade Chucker
Post by: Tomb on 06 Jan 2003, 02:59:21
plenty of mine scrolls in the ed's. Depot (http://www.ofpec.com/editors/index.php), matey!  :-*
Title: Re:Grenade Chucker
Post by: Padiimiite on 06 Jan 2003, 05:37:20
ya I know, but I was wondering if you could do it with a grenade.  But my main question is how do you get someone to actually throw a grenade at another person instead of just throwing it as far as they can?
Title: Re:Grenade Chucker
Post by: micropilot on 06 Jan 2003, 09:38:59
try: d00d DoTarget deadsoldier; d00d SelectWeapon "HandGrenade"; d00d Dofire ObjNull
Title: Re:Grenade Chucker
Post by: Josef on 06 Jan 2003, 18:06:18
or I think civvy DoFire deadussatanorsummatlikethat
Title: Re:Grenade Chucker
Post by: Padiimiite on 07 Jan 2003, 10:05:00
Alright, I figured out how to camcreate a grenade and get it to go off....you just use "grenade" instead of "handgrenade"....heh

But I still can't get the civy to throw the grenade AT anyone, he just throws it as far as he can. Thats no good for creating a cutscene. He has to hit something everytime not just when he feels like it. O well, nothing a script can't fix.
Title: Re:Grenade Chucker
Post by: micropilot on 07 Jan 2003, 20:00:54

<SNIP>

But I still can't get the civy to throw the grenade AT anyone, he just throws it as far as he can. Thats no good for creating a cutscene. He has to hit something everytime not just when he feels like it. O well, nothing a script can't fix.

Did you try what I had suggested?  This will make the civvy throw the grenade at whoever he is told to target.  I set this up in the editor and it worked flawlessly!!
Title: Re:Grenade Chucker
Post by: Pandoz on 07 Jan 2003, 22:46:04
"try: d00d DoTarget deadsoldier; d00d SelectWeapon "HandGrenade"; d00d Dofire ObjNull "

yes that works flawless...remember that d00d is his name...:) u can use this with many variations...always works.
Title: Re:Grenade Chucker
Post by: Padiimiite on 08 Jan 2003, 00:40:50
ok, ya your suggestions work but the civy with the grenade has to be outside of the minumum range or something or he won't throw it. Which sucks because I want him to throw it when he is close up, but safely away from, the target.