OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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)
-
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"
:-*
-
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!
-
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.
-
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
-
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!
-
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?
-
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"
-
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.
-
As most of the time, Macguba, is right again :D
-
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..