Home   Help Search Login Register  

Author Topic: @commited...  (Read 486 times)

0 Members and 1 Guest are viewing this topic.

Ace Productions

  • Guest
@commited...
« on: 04 May 2004, 07:26:04 »
Hi everybody,

I've seen in several scripts the use of the command @commited etc

Can someone please advice me how this command is used? Let's say I order a unit via a script to DoMove GetPos Spot and I want the unit to do an action when he reaches Spot how can I apply the @ command?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:@commited...
« Reply #1 on: 04 May 2004, 08:33:57 »
I don't know any commited command unless it's the camcommitted command you're talking about. camcommitted checks if a camera has finished committing.. like moving ect.

If you want to know in general how the @ function works I can tell you that it waits for a boolean value true to continue and while waiting it checks it's condition on every frame.
The answer to your example there would be to use the following

@unitready unit1
or
@unit1 distance place1 < 30
Not all is lost.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:@commited...
« Reply #2 on: 04 May 2004, 08:34:38 »
...
_unit doMove _pos
@unitReady _unit
_unit  doMove _pos2
...

@ checks wether the condition is met in every frame (or did I remember correctly?) so it can be a CPU stresser...

EDIT:
Argh, Artak beat me to it  ;D
Well, repetition has never harmed anyone...  ::)
« Last Edit: 04 May 2004, 08:36:00 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Ace Productions

  • Guest
Re:@commited...
« Reply #3 on: 04 May 2004, 08:41:45 »
Thank you both guys for your replies.