Vizard 7 » Command Index » Vizard modules » vizact » <vizact>.waitsignal
7.6

<vizact>.waitsignal

Create an action that will wait on a signal object

<vizact>.waitsignal(  
signal  
)  
signal
The signal object to wait for

Remarks

After you have created the action you can add it to any object as many times as you want.

As a shortcut, the signal object already contains the actions to wait and trigger, <signal>.wait and <signal>.trigger. You can directly add these to an object instead of creating the actions using <vizact>.waitsignal and <vizact>.sendsignal.

Return Value

An action that can be applied to any object

Example

#Create the signal object
sig = vizact.signal()

#Create an action to wait on the signal
waitsig = vizact.waitsignal(sig)

#Create an action to trigger the signal
trigsig = vizact.sendsignal(sig)

#Create an action to fade an object out
fadeout = vizact.fadeTo(0,time=1)

#Create an action to go to [10,0,0]
moveto = vizact.moveTo([10,0,0],speed=1)

#Add the actions to the objects.
#When 'object' is done moving it will trigger the signal.
#This will cause all the objects waiting on the signal to start fading out.

object.addAction(moveto)
object.addAction(trigsig)

object1.addAction(waitsig)
object1.addAction(fadeout)

object2.addAction(waitsig)
object2.addAction(fadeout)

object3.addAction(waitsig)
object3.addAction(fadeout)

See also

<vizact>.signal
<vizact>.sendsignal
<vizact>.fadeTo
<vizact>.moveTo