OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Headhunter on 06 Nov 2003, 21:22:30

Title: Fire on command
Post by: Headhunter on 06 Nov 2003, 21:22:30
Is there any way you can make a unit fire into the air on a trigger activation???
Title: Re:Fire on command
Post by: Kaliyuga on 06 Nov 2003, 21:24:00
 AI  won't fire unless you give em something to shoot at.  

You can setposition something way up in the air and try to have em shoot at that...   there are some invisible targets out there somewhere as well that you can setposition up in the air to get the desired effect
:cheers:
Title: Re:Fire on command
Post by: Headhunter on 06 Nov 2003, 22:05:30
can you give me the scripts for that???
Title: Re:Fire on command
Post by: Kaliyuga on 06 Nov 2003, 22:10:26
you can put this in an objects init field:


setpos [getpos this select 0, getpos this select 1,x]

where x = height above ground

and then you can make a trigger or whatever with this as its activation:

dude dotarget object; dude dofire object


where dude is the guys name and object is the name of the object he's firing at....

Title: Re:Fire on command
Post by: macguba on 06 Nov 2003, 22:15:36
I think if you just give a unit a fire command it will fire one round in the air.

loon1 fire "flarered"

certainly does that.   Syntax not guaranteed of course.
Title: Re:Fire on command
Post by: Unnamed on 06 Nov 2003, 22:33:16
Yeah if you give the AI a fire order without a valid target, he will mimic the flare action (assuming the he is not already been asked to fire the flare) and shoot into the air.
Title: Re:Fire on command
Post by: Headhunter on 07 Nov 2003, 11:41:17
thanks, thats all i need