An addendum to what said by Lightfoot8.
Delayed calls with a delay _inferior_ to 0.1 will carry out in the exact order they are "met" in the script.
But as the delay increases, say to 0.1 and after, the order of execution shall be _inverted_. Watch out for it.
This applies to DestroyObject() as well.
DelayCommand (0.0f, SendMessageToPC (GetFirstPC (), "DBG: 1"));
DelayCommand (0.0f, SendMessageToPC (GetFirstPC (), "DBG: 2"));
DelayCommand (0.0f, SendMessageToPC (GetFirstPC (), "DBG: 3"));
DelayCommand (0.0f, SendMessageToPC (GetFirstPC (), "DBG: 4"));
DelayCommand (0.1f, SendMessageToPC (GetFirstPC (), "DBG: 11"));
DelayCommand (0.1f, SendMessageToPC (GetFirstPC (), "DBG: 22"));
DelayCommand (0.1f, SendMessageToPC (GetFirstPC (), "DBG: 33"));
DelayCommand (0.1f, SendMessageToPC (GetFirstPC (), "DBG: 44"));
The above instructions will produce the following output:
DBG: 1
DBG: 2
DBG: 3
DBG: 4
DBG: 44
DBG: 33
DBG: 22
DBG: 11
-fox
Modifié par the.gray.fox, 12 novembre 2010 - 02:55 .