OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: GrimMonkey on 21 Sep 2003, 00:13:35
-
I didn't want to write this again but LCD made me :P,
Anyway,
How can I make it so that soldiers stay crouched and prone, I don't want to use behaviour commands and when I use:
this switchMove "crouch"
they only stay for one second?
I also have the same problem with:
this switchMove "combat"
Help please
Also, does anyone have a script so that a vehicle explodes?
Be warned: more questions will be posted here once I remember them :o
Beware the GrimMonkey
-
how about setting up a looping script?
something along the lines of:
#loop
unit switchMove "crouch"
~0.5
goto "loop"... just a thought.
As for the vehicle exploding...err
tankname setdammage 1
as long as the thing has a lot of fuel in it they will usually blow up quite convincingly.
-
tankname setfuel 1
~0.01
tankname setdammage 1
There, a nice big explosion ;D.
-
how about setting up a looping script?
something along the lines of:
#loop
unit switchMove "crouch"
~0.5
goto "loop"... just a thought.
Doesn't seem to work :-\.
I haven't tried the explosions yet though...
-
Looping animations is tricky.... sometimes it doesn't really work. Even when it does you have to experiment a bit with the delay. I find it helps to Preview and watch the animation once or twice, timing it. Then you can try
~0.65
or whatever and keep changing it till you find a time delay that works.
Remember to include something to break the loop when you want the animation to end.
Pertinent aside: I have noticed, in reading (and writing) thousands of answers on this forum, that the answer is almost always correct but usually needs a bit of tweaking before it will work.
-
here is the ultimated blow up script
aim1 = getpos fire select 0
aim2 = getpos fire select 1
aim3 = getpos fire select 2
"Laserguidedbomb" camcreate [aim1,aim2,(aim3 + 3)]
just name the unit fire, execute the script, and BOOM
-
Thanks _Ross_,
@MacGuba,
The guy doesn't seem to crouch at all, he just stays up.
BTW, I need the same thing for "lying" and "combat", I know I just can use this setunitpos "down"
but I want him to be able to stand up :).
I remembered a question I previously forgot!
How would one write an 'addaction' command, note I know some of the syntax but I forget what exactly to write?
Beware the GrimMonkey
-
How would one write an 'addaction' command, note I know some of the syntax but I forget what exactly to write?
Command:
AddAction
Description:
Adds an action to a units action menu.
Syntax:
actionid=unit addaction["actiontext","actionscript"]
actionid is the name of your action, for use with the removeaction command
actiontext is the text which will appear on the units action menu.
actionscript is the scritp that will run when the user clicks on the action. It must be a file, not a command.
The action menu is called up using the middle mouse button or enter key in game.
Returns:
-
Example:
attack=player addaction["Attack the base!","attack.sqs"]
:cheers:
-
Thanks Kaliyuga,
Where do I place the command or whatever so I can call it up (Or did I miss something)?
*Edit* Never mind, I found it ;D.
-
Does anyone know a good HALO script? I have one but it's outdated :'(.
-
I think there are some in the Ed Depot .... I have a feeling toadlife did one but I may be wrong ... or that may be the old one you found.... (exits stage left, muttering to himself)
-
u put the addQAction command in the units INIT :) err um. damn pesky monkeys ::) :o
(exits stage left, muttering to himself)
Tanks! ;D lmao
-
Can someone give me some pics of vehicles (OFP or not). Small ones, able to fit on a card or something. Pics of tanks only; M113, M1A1, M2A2, T72, T80, etc. No supertanks, tanks that exist :).
Thanks 8).
Beware the GrimMonkey
-
Can someone give me some pics of vehicles
http://www.fas.org/man/dod-101/sys/land/index.html
-
Thanks, or rather Tanks!
Beware the GrimMonkey