Author Topic: a question about these in scripts.  (Read 375 times)

Legacy_harjoblog

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
a question about these in scripts.
« on: July 14, 2012, 09:23:33 pm »


                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.
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
a question about these in scripts.
« Reply #1 on: July 14, 2012, 09:45:15 pm »


               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