OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Yippyfn on 15 Apr 2003, 02:31:29

Title: Fire at Nothing, Soldier!
Post by: Yippyfn on 15 Apr 2003, 02:31:29
What's the little action thingy for men to just fire their weapon? is it something like "unitname action ["firegun"]"? (That's a sad guess)
Title: Re:Fire at Nothing, Soldier!
Post by: _hammy_ on 15 Apr 2003, 05:23:58
if you want him to shoot at nothing, place a gamelogic where you want him to shoot at, then name this gamelogic "gml"

in a script or in a init field, put the following:

this dofire "gml"

if that doesn't work, try this:

this dotarget "gml"
this dofire "gml"

 :-*
Title: Re:Fire at Nothing, Soldier!
Post by: titan on 15 Apr 2003, 11:58:31
u cant target a gl...no idea why!

if u do want it to fire at nothing put

unitname fire "weaponname"


prob is that this makes a man fire into the air!
Title: Re:Fire at Nothing, Soldier!
Post by: Yippyfn on 15 Apr 2003, 12:28:43
Actually since this was a cutscene I just zoomed the camera in on the guy with a weapon, put a cvilian off camera (named civilian) and put:

guywgun dotarget cvilian

guywgun dofire civilian

 Kinda like that.
Title: Re:Fire at Nothing, Soldier!
Post by: macguba on 15 Apr 2003, 13:34:23
I know you've basically solved your problem, but for the sake of completness ...... there are two fire commands


--------------------------------------------------------------------------------


unit fire weaponName

Operand types:
unit: Object
weaponName: String
Type of returned value:
Nothing
Description:
Unit will fire from given weapon.

Example:
soldierOne fire "HandGrenade"

comment »



--------------------------------------------------------------------------------


unit fire array

Operand types:
unit: Object
array: Array
Type of returned value:
Nothing
Description:
Unit will fire from given weapon. Argument has format [muzzle, mode, magazine] or [muzzle, mode].

Example:
soldierOne fire ["throw","SmokeShell","SmokeShell"]


General tip

If you want to do something
And you don't know how
But you can think of a good keyword associated with the problem
Like "fire" in this case
Look up the keyword in the Command Ref
It's amazing how often you get lucky

Actually its well worth reading the Command ref just so you know what's in there

 
 
Title: Re:Fire at Nothing, Soldier!
Post by: punisher on 15 Apr 2003, 21:47:13
hi

Alright i dont want to sound like a dumass but i have tryed the dotarget thing and i get an error before i can press ok.

I am making a firing rang scene and i want guys to shoot at targets continualy.
HELP!
Title: Re:Fire at Nothing, Soldier!
Post by: macguba on 15 Apr 2003, 22:17:04
Tell us more punisher, I can't visualise your problem.    At what stage does the pressing ok come into it?    Is that still in the mission editor?
Title: Re:Fire at Nothing, Soldier!
Post by: punisher on 16 Apr 2003, 12:41:01
yes
when i am in the editor and i have entered the:
this dotarget "man"
this dofire "man"

Then i press ok in the window and it has an error and wont let me leave the window.

It goes somthing like this

"enter object,array"

and somthing about "dotarget"
Title: Re:Fire at Nothing, Soldier!
Post by: macguba on 16 Apr 2003, 13:28:45
What you have there m8 is a syntax problem.     The solution is always to head over to the Command Ref.

I suspect that you don't need the " " - try it without them.
Title: Re:Fire at Nothing, Soldier!
Post by: Artak on 16 Apr 2003, 13:41:04
As most of the time, Macguba, is right again  :D
Title: Re:Fire at Nothing, Soldier!
Post by: asmodeus on 16 Apr 2003, 13:47:51
Quote
when i am in the editor and i have entered the:
this dotarget "man"
this dofire "man"

if that's exactly what you're entering there's another prob..  you need a ;

this dotarget man; this dofire man

Thought that might help..