OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: GrimMonkey on 21 Sep 2003, 00:13:35

Title: GrimMonkey has more Q's
Post 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
Title: Re:GrimMonkey has more Q's
Post by: Stu35 on 21 Sep 2003, 00:31:41
how about setting up a looping script?

something along the lines of:

Code: [Select]
#loop

unit switchMove "crouch"
~0.5
goto "loop"
... just a thought.

As for the vehicle exploding...err

Code: [Select]
tankname setdammage 1
as long as the thing has a lot of fuel in it they will usually blow up quite convincingly.
Title: Re:GrimMonkey has more Q's
Post by: m21man on 21 Sep 2003, 05:33:18
Code: [Select]
tankname setfuel 1
~0.01
tankname setdammage 1

There, a nice big explosion ;D.
Title: Re:GrimMonkey has more Q's
Post by: GrimMonkey on 21 Sep 2003, 05:55:41
how about setting up a looping script?

something along the lines of:

Code: [Select]
#loop

unit switchMove "crouch"
~0.5
goto "loop"
... just a thought.
Doesn't seem to work :-\.

I haven't tried the explosions yet though...
Title: Re:GrimMonkey has more Q's
Post by: macguba on 21 Sep 2003, 10:32:49
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.    
Title: Re:GrimMonkey has more Q's
Post by: _Ross_ on 21 Sep 2003, 21:42:43
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
Title: Re:GrimMonkey has more Q's
Post by: GrimMonkey on 22 Sep 2003, 01:58:37
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
Title: Re:GrimMonkey has more Q's
Post by: Kaliyuga on 22 Sep 2003, 02:31:48
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:
 




Title: Re:GrimMonkey has more Q's
Post by: GrimMonkey on 22 Sep 2003, 02:36:22
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.
Title: Re:GrimMonkey has more Q's
Post by: GrimMonkey on 22 Sep 2003, 02:40:59
Does anyone know a good HALO script? I have one but it's outdated :'(.
Title: Re:GrimMonkey has more Q's
Post by: macguba on 22 Sep 2003, 02:54:00
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)
Title: Re:GrimMonkey has more Q's
Post by: Captain Winters on 22 Sep 2003, 04:03:39
u put the addQAction command in the units INIT  :) err um. damn pesky monkeys  ::) :o

(exits stage left, muttering to himself)

Tanks!  ;D lmao
Title: Re:GrimMonkey has more Q's
Post by: GrimMonkey on 23 Sep 2003, 05:41:55
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
Title: Re:GrimMonkey has more Q's
Post by: Kaliyuga on 23 Sep 2003, 07:44:07
Can someone give me some pics of vehicles

http://www.fas.org/man/dod-101/sys/land/index.html
Title: Re:GrimMonkey has more Q's
Post by: GrimMonkey on 27 Sep 2003, 03:26:39
Thanks, or rather Tanks!


Beware the GrimMonkey