Jump to content

Recommended Posts

Since waitUntil no longer does anything outside Booleans, what are some other good ways to wait in a script until a certain condition is activated?

 

while do works for certain things but it's not 100% reliable.

 

for instance originally you would have

waitUntil {speed _object < 20};

 

so i would try something like: 

while {speed _object  > 19} do {sleep 0.1};

 

But it was returning errors.

Share this post


Link to post
Share on other sites

waitUntil should work just fine for what you're trying to do. I would just make sure you put the script command and variable within parentheses before the < operator.

 

try using:
waitUntil {(speed _object) < 20};

 

Whatever is after that should fire whenever _object's speed drops below 20.

  • Thanks 1

Share this post


Link to post
Share on other sites
16 hours ago, Rook Mk1 said:

Since waitUntil no longer does anything outside Booleans

it never really did, so what was the problem?

 

16 hours ago, Rook Mk1 said:

for instance originally you would have

waitUntil {speed _object < 20};

why would you not have it now?

 

10 hours ago, alpha993 said:

try using:
waitUntil {(speed _object) < 20};

Thats the same as above, just with needless parenthesis added.

  • Like 1

Share this post


Link to post
Share on other sites

Depends on what you are trying to do.  waitUntil is laggy as hell in MP and I would completely redo your script to remove it altogether.

Share this post


Link to post
Share on other sites
1 minute ago, hcpookie said:

waitUntil is laggy as hell in MP

waitUntil works just as any other scheduled script.

Share this post


Link to post
Share on other sites

@Dedmen

 

Yeah I realise that it works now, it was a problem with the script.

I was just under the impression that including anything other than true or false into a waituntil condition didn't work after update v1.93.145618

 

Quote

Since Arma 3 v1.93.145618 returning anything other than true or false from condition will result in appropriate type error

 

Share this post


Link to post
Share on other sites
20 minutes ago, Rook Mk1 said:

I was just under the impression that including anything other than true or false into a waituntil condition didn't work after update v1.93.145618 

Well yes, thats correct. It will throw a warning.

Share this post


Link to post
Share on other sites

It will still work just log warning every 10 seconds or so. Also not to address anyone in particular, if you are not sure how waitUntil works, please do not spread misconception 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×