Home   Help Search Login Register  

Author Topic: Back to OFP once again!  (Read 1196 times)

0 Members and 1 Guest are viewing this topic.

Offline 999chris

  • Members
  • *
  • I'm a llama!
Back to OFP once again!
« 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?

Offline dr. seltsam

  • Members
  • *
Re: Back to OFP once again!
« Reply #1 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.

 :)

Offline Gcfungus

  • Members
  • *
Re: Back to OFP once again!
« Reply #2 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.
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline schuler

  • Contributing Member
  • **
Re: Back to OFP once again!
« Reply #3 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  ;)
« Last Edit: 21 Apr 2008, 09:54:38 by schuler »
Semper Fi

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Back to OFP once again!
« Reply #4 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 @.
urp!