waitUntil – Talk
No edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
I was trying to use waitUntil in a trigger's OnActivation field but it would give Generic error. I set waitUntil in code but that didn't work either. | I was trying to use waitUntil in a trigger's OnActivation field but it would give Generic error. I set waitUntil in code but that didn't work either. | ||
<code>dowaitthing = {player sidechat "hi"; waituntil {alive player}; player sidechat "boo"}; | <code>dowaitthing = {player sidechat "hi"; waituntil {alive player}; player sidechat "boo"}; | ||
</code> | </code> | ||
And in the trigger I used '''call dowaitthing'''. ''sleep'' wouldn't work this way either. --[[User:Doolittle|Doolittle]] 18:40, 19 July 2007 (CEST) | And in the trigger I used '''call dowaitthing'''. ''sleep'' wouldn't work this way either. --[[User:Doolittle|Doolittle]] 18:40, 19 July 2007 (CEST) | ||
If it's from a trigger or init field, you have to call it like this: | |||
<code>dowaitthing =[] Spawn {player sidechat "hi"; waituntil {alive player}; player sidechat "boo"}; | |||
</code> | |||
Or move the code into a script file and [[spawn]] or [[execVM]] that file. Same goes for [[sleep]] to. [[User:UNN|UNN]] 15:09, 20 July 2007 (CEST) |
Revision as of 14:09, 20 July 2007
Is it just my imagination or do conditional waits actually check the condition very, very often? Someone might want to check out how often; more complex scripts can really degrade the performance -- Manny 16:34, 14 April 2007 (CEST)
- waitUntil works within the confines of the particular hardware running Arma. If you try to exceed the capabilities of your hardware, then you will probably notice some sort of degradation. It can't perform the impossible. UNN 01:26, 17 April 2007 (CEST)
I was trying to use waitUntil in a trigger's OnActivation field but it would give Generic error. I set waitUntil in code but that didn't work either.
dowaitthing = {player sidechat "hi"; waituntil {alive player}; player sidechat "boo"};
And in the trigger I used call dowaitthing. sleep wouldn't work this way either. --Doolittle 18:40, 19 July 2007 (CEST)
If it's from a trigger or init field, you have to call it like this:
dowaitthing =[] Spawn {player sidechat "hi"; waituntil {alive player}; player sidechat "boo"};
Or move the code into a script file and spawn or execVM that file. Same goes for sleep to. UNN 15:09, 20 July 2007 (CEST)