Vizard 8 » Command Index » Vizard objects » animationpath » <animationpath>.addEventAtEnd
8.0

<animationpath>.addEventAtEnd

Trigger event when end is reached

<animationpath>.addEventAtEnd(  
name  
)  
name
Name of the event. This can be any string which will be assigned to the name attribute of the viz.PATH_EVENT event object.

Remarks

This command will add an event to the path which will be triggered when the path reaches the end of one full loop.

A viz.PATH_EVENT will be triggered with the specified event name and animation path.

Return Value

None

Example

# Create event when end of path is reached
path.addEventAtEnd('end')

# Register callback when end is reached
def onEndReached():
    print('end reached')
vizact.onPathEvent(path, 'end', onEndReached)

See also

<animationpath>.addEventAtControlPoint
<animationpath>.addEventAtDistance
<animationpath>.addEventAtTime
<animationpath>.clearEvents
<animationpath>.removeEvent
<vizact>.onPathEvent
<viztask>.waitPathEvent
viz.PATH_EVENT