Aller au contenu

Photo

a question about these in scripts.


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
harjoblog

harjoblog
  • Members
  • 19 messages
 I'm making a script that has timed occurances. But I don't understand exactly how these work exactly so I'll post and example and then my question about them.

First
ActionWait(0.0.); does this make the entire script wait the amount of seconds in () or what? I'm just not really sure exactly how it functions in a script. Does it pause the entire script for (0.0) amount of seconds?

DelayCommand(0.0), function(constant, variable, xxxx)); do the numbers right after DelayCommand control the amount of seconds that pass before the command is ran?

DestroyObject(oTarget, 0.0);    again, does the number after oTarget wait that many seconds before destroying the object?

if I understood exactly how these worked, I could time the events in the script better and take out ones that I've put in that don't do anything.

#2
Kato -

Kato -
  • Members
  • 392 messages
From the Lexicon:

Adding ActionWait() to an object action queue causes the object to pause fSeconds seconds before performing the next action in the queue.

N.B., ActionWait will NOT introduce a pause in the execution of your script - nothing will. If you want to delay the engine's execution of a piece of code (rather than an object's execution of an action), you should use DelayCommand() on an ExecuteScript() call instead.

You're right about DestroyObject()


Kato