Get your own free workspace
View
 

Persistent

Page history last edited by Gamemaster 3 years, 11 months ago

 

Persistent

Usage:

                Persistent(Flag)

Description:

The Persistent command allows you to toggle the persistence flag for the current script. If this flag is true, and the main actor logs off while the script is still running, it will be paused until they log back on. It does not apply to scripts where the actor is an NPC, where there is no actor, or to the context actor.

This is useful for quest scripts which may be running for a long time and should not end until the quest is completed.

Example:

                Function Main()
                        // Make script persist
                        Persistent(1)
                        // Wait for player to kill a wolf, even between logging off/on
                        WaitKill(Actor(), ActorID("Wolf", "Creature"), 1)
                        Return()
                End Function

Comments (0)

You don't have permission to comment on this page.