QuickScripts

Revision as of 11:58, 18 April 2009 by Dʹlanor (Talk | contribs) (placeholders added for documentation)

About QuickScript

QuickScript is the shorthand version of AlcScript. It does not replace AlcScript but writes a full AlcScript in the background. While QuickScript is relatively easy to use its possibilities are limited. It cannot create complex processes!


Those who are eager to learn more about the Plasma engine are advised not to use QuickScript but instead use AlcScript, which more closely follows the logic of the Plasma engine.


StateAnimation

A QuickScript for animations with two states. For example a door which opens and closes. The open and closed states are saved to a SDL variable. The SDL variable is controlled by Python script. Don't worry about that because we are using Cyan's global Python files. You don't have to write a single byte of Python code.

QuickScript Settings

<clickable object>:
    quickscript:
        stateanimation:
            objectname: <animated object>
            region: <clickable region>
            sdlname: <sdl variable>
            facevalue: <tolerance for facing condition>
            clicktimeout: <time to disable clickable>
            avatar:
                animation: <avatar animation>
                animtarget: <avatar animation target>
                marker: <callback marker>
            forewards:
                animation: <opening animation>
                animsound: <opening sound emitter>
                clickanim: <clickable opening animation>
                clicksound: <clickable opening sound emitter>
            backwards:
                animation: <closing animation>
                animsound: <closing sound emitter>
                clickanim: <clickable closing animation>
                clickreverse: <true | false>
                clicksound: <clickable closing sound emitter>

General info: Leave out the <> characters. These are variables you need to replace with your own object names. Leave out the | character as well. It means you can use only one of the choices given (true or false).

Settings Explained

  • objectname: This is your animated object. Since we are using a clickable to activate the animation we have to make sure it does not start automatically or keeps looping once it has started. For more information about setting up animations see Animations.
<animated object>:
    animations:
        - name: <opening animation>
          autostart: 0
          loop: 0
  • region: The region around your clickable object. See also How to make an Object Clickable.
  • sdlname: The name of your SDL variable. If your animated object is a door you probably should call it something like DoorOpen. DEFAULT=0 means that the door is initially closed. See also Using SDL States. Example SDL file:
   VAR BOOL 	DoorOpen[1]		DEFAULT=0
  • facevalue: The tolerance for the facing condition. Optional (default = no facing condition). This was thrown in for completeness sake but you can leave it out if you don't need it. The facing condition is discussed here: How to make an Object Clickable#Facing condition.
  • clicktimeout: Disables the hotspot of the clickable object during the time you set here. Optional (default = no time out). Leave this out if you do not need it. The time is a float value (for example 3.5).
  • avatar: Here you can set parameters for the avatar animation. These are optional. So again you can leave this out of your script if you do not need it.
    • animation: The name of the avatar animation without the Male/Female prefix.
    • animtarget: The name of an empty object placed at the position where you want the avatar animation to start.
    • marker: You can optionally specify the name of a callback marker within the avatar animation you use. By default the callback will be the end of the animation.
  • forewards: This is where you set the variables for the "opening" or "forwards" animation. The spelling of "forewards" is not an error but is kept consistent with the full AlcScript which in turn conforms to Cyan's spelling.
    • animation: The name of your opening animation.
    • animsound: The name of the emitter object for the opening sound. Optional. See also Adding Sounds I.
    • clickanim: The name of the opening animation for the clickable object (for example a door button). Optional.
    • clicksound: The name of the emitter object for the opening sound of the clickable. Optional.
  • backwards: This is where you set the variables for the "closing" or "backwards" animation.
    • animation: The name of your closing animation. If it is the same as the opening animation that animation will be automatically reversed.
    • animsound: The name of the emitter object for the closing sound. Optional. Can be the same as the opening sound.
    • clickanim: The name of the closing animation for the clickable object (for example a door button). Optional. Can be the same as the opening clickable object animation.
    • clickreverse: Optional. The closing animation for the clickable object (if any) will not be reversed by default if it is the same as the opening animation. Setting this to true will play the opening clickable object animation backwards. Setting this to false is effectively similar to simply omitting this line. This setting is ignored if opening and closing clickable object animations are different.
    • clicksound: The name of the emitter object for the closing sound of the clickable. Optional. It can be the same as the opening sound.


SimpleClick

QuickScript Settings

Settings Explained

SelfAnimation

QuickScript Settings

Settings Explained

SDL BoolShowHide

QuickScript Settings

Settings Explained

SDL RandomBool

QuickScript Settings

Settings Explained

SDL IntActEnabler

QuickScript Settings

Settings Explained