OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 999chris on 27 Mar 2008, 19:47:02

Title: Back to OFP once again!
Post by: 999chris on 27 Mar 2008, 19:47:02
Hello!

Just started editiing OFP missions once again, woo hoo... luckily I still have my old knowledge, alas though. I have travelled back to this trust forum for answers to my stupid problems.

Right now my issue is in external script files "sqs's"

in my script I have

? !(player in _heli): ~4

For some reason,.. it dont like ~4... how can I format it so it will glady wait 4 seconds?
Title: Re: Back to OFP once again!
Post by: dr. seltsam on 29 Mar 2008, 06:43:32
I dont't know exactly what your goal is, but if you want to have a script wait and check until the player is in a chopper you maybe can solve it like this:

_d=0
# Wait
~_d
? !(player in _heli) : _d=4; goto "Wait"

This here will jump back to the "Wait"-Label until the player is in the heli.

 :)
Title: Re: Back to OFP once again!
Post by: Gcfungus on 21 Apr 2008, 08:58:27
Alternatilvely, you could try:

?!(player in _heli): goto "notinheli"
goto "inheli"
#notinheli
~4
#inheli

Note: in dr.seltsam's example, it will loop until he is in the heli and check every 4 seconds. my example will check if he's in the heli once, then wait 4 seconds.
Title: Re: Back to OFP once again!
Post by: schuler on 21 Apr 2008, 09:49:01
hello 999chris, i think the only think you might have done wrong is the placing of the ~4,, its those little things we forget  ;)
Why the 4 sec's? cutscene?  if there is a sync,WP get in, helo WP load, it should wait for him to board. If you modifiy the WP to 4 sec's you might not need a script. ,, if its a cutscene you would need one more then likly/
Note if scripted move the ~4 like so,,,,, in your script!
? !(player in _heli):
 ~4
That way in he is in the chopper, it wont move for 4 sec's.
Cheers schuler
    note the above is very helpful  ;)
Title: Re: Back to OFP once again!
Post by: Mr.Peanut on 21 Apr 2008, 14:14:19
The sqs tilde i.e. ~ must be at the beginning of a line.

This is also true of sqs wait command @.