ON Commands

  • on (your command)
    Scriptpart that is being processed when using the right command which you previously set with the scriptcommand command()
  • on (mouse)
    Event that is processed when the mouseicon runs over an object or character.
    Example : Show an Infotext with showinfo about the object/character.
  • on (mouseout)
    Event that is procesed when the mouse leaves an object or a character.
  • on (click)
    Event that is processed when you click on an object or character, no matter what gamecommand is set.
    Example : Use this to do walkto commands to let your character walk to the current object.
  • on (release)
    This is the opposite to On(click). This event is being called when the player releases the mousebutton over an object.
    Beispielanwendung : Drag n Drop Objects or Slidebars, look at the homepage for an example ADZ file.
  • on (rightclick)
    Event for the right mouse button. IMPORTANT : This event only works if there are no additional mouseicons used except the Default- and the Loading Mouseicon! This means : You are using a taskbar controlled game (GUI) like Manian Mansion!
    Example :

    on (rightlick)
      command (open)

    With this the right mouse button will open the clicked objekt immidiently... so the player has always a fastaction button.
  • on (doubleclick)
    Event that is processed when you doubleclick on an object or character. This event only happens when no gamecommand is selected, to avoid conflicts.
    Just as using events like on(look) the scriptpart of on (doubleclick) will first be processed when the character has reached the coordinates that were given with the walkto instruction within the on(click) event.
  • on (enter)
    In the roomscript : This part will be processed when a room is entered, but only if there is no cutscene active.
    Example : Use this to play music or looping soundeffects.
  • on (exit)
    In the roomscript : This part will be processed when a room is exited.
  • on (loop1)
    In the roomscript : Event that is being processed always when a room is loaded and over and over again, no matter what happens in the game.
    Example : Use this to create background effects and animations that are not gameplay dependent.
  • on (loop2)
    In the roomscript : Works like Loop1 instead that this process stops in cutscenes, textscenes and when a character is targeted by the player. If such a Loop2 Script was stopped it will restart from the beginning next time.
    Example : Use this to create dialogs of characters that run in background while you are still playing. If you talk to these characters the Loop2 script will stop.
  • on (link)
    Event that is being processed when an object is linked with the command link. on (link) has to be used with if_link() to verify if the right object was combined.
  • on (givelink)
    In the characterscript : Reacts when the scriptcommand givelink was used with an item. Use this to give things from one character to another..
  • on (cant+your command)
    In the characterscript : Reaction of a character when a specified command could not be processed.
    Example: If an object cannot be picked up (it has no on(pickup) part), you should make a part with on (cantpickup) in the characterscript to let your character say "I cant pick that up".
  • on (cantall)
    In the characterscript : Reaction of a character when any command could not be processed.
    Example: Use this to let your character say something like : "That doesn't work" if something cannot be done.


    IF Commands

    Every IF Command can be used as ifnot to negiate the result. Example : ifnot_focus (john)

  • if_obj (instance ; state)
    Checks the state (1-10) of an object. Can also be used with < and > just like : if_obj (object1 ; > 3)
  • if_xobj (instance ; x)
    Checks the X position of an object. X can be a number or a variable declared by these brackets [ ].

    You can also read the X Position of an object by using [objx:object] as variable.
  • if_yobj (instance ; y)
    Checks the Y position of an object. Y can be a number or a variable declared by these brackets [ ].

    You can also read the X Position of an object by using [objy:object] as variable.
  • if_focus (characterinstance)
    Checks which character is currently focused
  • if_charin (characterinstance ; room)
    Checks if a character is in a specific room.
  • if_ischar (characterinstance)
    Checks in a walkmapscript if the specified character has stepped onto the walkmap-point.
  • if_hasitem (characterinstance ; item)
    Checks if a character owns a specified item.
  • if_num (name ; num)
    Verifies a Number Variable. num can be a single number or something like <3 or >100, or you can use another number variable to compare with. There you have to use those brackets to specify another variable : if_num (num1 ; <[num2])
    If the number variable was not set before it is 0.
    Instead of a number variable you can insert the identifiers [mousex] and [mousey] to react on the current mouse position.
  • if_string (name ; text)
    Verifies a string variable. This check is not case sensitive.
  • if_bool (name ; true/false)
    Checks if a boolean is true or false. If a bool was not added before in the bools-list it will be false by default.
  • if_keydown (key)
    Checks if the player has hit a key. You can use the keys : a-z, 0-9, up, down, right, left, ctrl, alt, space, enter, backspace and F1 - F10.
  • if_keypressed (key)
    Checks if the player holds down a key. You can use the keys : a-z, 0-9, up, down, right, left, ctrl, alt, space, enter, backspace and F1 - F10.
  • if_mousewheel (up /down)
    Checks the mousewheel. Can be used for controlling the game's volume.
  • if_command (command)
    Checks which command is set in the game like "use" or "look". If you want to check if the current command is "walk to" you'll have to write if_command ()
  • if_link (linkname)
    Checks the name that was entered with the command link (linkname). Use this to verfiy that 2 wanted objects get combined.
  • if_givelink (item)
    Checks which item has called "givelink()" before.
  • if_textscene (textscenename ; level ; row ; true/false)
    Checks if a row of a level of a textscene is activ or inactiv.
  • if_room (roomname)
    Checks the current room that is loaded.
  • if_item (item ; state)
    Checks for the current state of an item.


    Set Commands

  • command (commandname)
    Sets the current command you use in your game, like "use" "open" ect. Only needed when you have a taskbar with buttons on it. If you create a mousecontrolled game the commands are automaticly changed when clicking the right mousebutton.
  • instmouse (Icon Number)
    Sets the state of the mouseicon but only while the mouse is running over the object that called instmouse.. Only works if classic mode in the mousewindow is NOT selected.
  • setfocus (characterinstance)
    Choose a character for getting the focus. The focused character can be controlled by the player. With "none" you select no character. With "last" you select the character that had the focused before the last call of setfocus.
  • setbool (boolean ; true/false)
    Sets a boolean to TRUE(1) or FALSE(0).
  • setnum (name ; num)
    Sets a number variable. num can be a single number or an Addition/Subtraction with +/-. Also you can fill in another Variable, which will then be entered with brackets like these : setnum (num1 ; +[num2])
    You can also do this setnum (num1 ; [num2] - [num3] * 3)
    Instead of a number variable you can insert the identifiers [mousex] and [mousey] to get the current mouse position.

    Number Variables can be used for most of the instructions as values, example walkto (self ; [x] ; [y])
    Strings and Numbers are using the same memory, so they must not use the same names!
    Note : You can even use Variables for Variablenames, if you want to.
    Note : See "Using variables" for a list of fixed variable names that can NOT be used.
  • setstring (name ; text)
    Saves a textline into a variable. This can be used for various instructions.
    Example : setfocus ( [character] ). The name that the string character contains will be the focused character.
    Strings and Numbers are using the same memory, so they must not use the same names!

    Variables can be displayed on screen by using them in speech and offspeech instructions, like speech (self ; [text1] and [num2]).
    Note : You can even use Variables for Variablenames, if you want to.
  • randomnum (name ; highest number)
    Sets a number variable with a random number between 1 and the highest number.
    Note : You can even use Variables for Variablenames, if you want to.
  • savenum (name)
    Saves a number variable to harddisk, independent from any SaveGame. The only usage i know is to save the highscore in my Wack-A-Rat Demo, but maybe you can use it for many other things.
  • loadnum (name)
    Loads a number variable from harddisk. If the number is not existing the result is 0.
  • savestring (name)
    Saves a text variable to harddisk, independent from any SaveGame. Could be used for having textlines with location and time information saved in your own load/save menu.
  • loadstring (name)
    Loads a text variable from harddisk. If the string is not existing the result is none.
  • offtextcolor (Red ; Green ; Blue)
    Sets the color of the offtext. Offtext is used with offspeech.
  • infotextcolor (Red ; Green ; Blue)
    Sets the color of the infotext. Infotext is used with Showinfo and the ActionLine.
  • settransparency (1-100)
    Changes the visibility of the taskbar and the "Anywhere" room.
  • setfont (1-99)
    Select one out of 99 fonts you can have in the game, affects offspeech and textscenes. Setfont can also be used like this setfont (2 ; character). With that you can specify a font for a single character.
  • setscreenchange (style)
    Choose the style for changing a room. Possible effects are : DIRECT, FADEBLACK, RECTANGLE, CIRCLE, SHUTTERS, CLOCK, BLEND and BLENDSLOW
  • setwalkmap (room ; x ; y ; true/false
    Sets a point of a walkmap of a room to true (free) or false (blocked).
  • set_rect_walkmap (room ; x1 ; y1 ; x2 ; y2; true/false)
    Sets an area, specified by x1,x2,y1,y2, of a walkmap of a room to true (free) or false (blocked). Can be used when you have to change a big part of a walkmap without having to change every single point.
  • sqrt (name)
    Calculates the squareroot of a number variable and saves the result in the same variable..


    Sound & Movie Commands

  • playsound (name ; volume)
    Plays a soundeffect. Optional you can define the playback volume : 0-100 Procent.
  • stopsound (name)
    Interrupts a soundfile if neccessary.
  • playmusic (name ; position)
    Plays a musictrack. If the specifed music is a module track you can specify also the position (pattern) to start the module. With that you could make a bit more dynamic music usage, as you might know from DOTT. There when you change to another character the music plays a little intro for that character first.
  • musicvolume (0-100)
    Changes the musicvolume. The changespeed depends on the setting of fadespeed.
  • speechvolume (0-100)
    Changes the volume of speechfiles.
  • stopmusic ()
    Stops the music.
  • fadespeed (1-15 or time)
    Sets the speed for the crossfade effect between two musicfiles and how fast the music will be stopped. Default is 13.

    1 means very slow while 15 means very fast. You can also enter a timevalue in milliseconds like 1000ms. This sets the crossfading exactly to 1 second.
  • seteax (Effect)
    Activates EAX Effects for the soundoutput. With that you can add echo and reverb effects to your rooms. Important : EAX only works with mono samples. Stereosounds will always be played without EAX!
    Note : If you want your music not to be played with EAX you have to write the playmusic instruction BEFORE the seteax instruction!

    These are the available effects from which you can choose.

    paddedcell
    livingroom
    cave
    carpetedhallway
    alley
    mountainse
    parkinglot
    drugged
    concerthall
    room
    stoneroom
    arena
    hallway
    forest
    quarry
    sewerpipe
    dizzy
    none = turn EAX off
    bathroom
    auditorium
    hangar
    stonecorridor
    city
    plain
    underwater
    psychotic
    off = turn EAX off
  • playvideo (video ; true/false)
    Plays a Video File The second entry defines if the script will be stopped during play. Optional you can setup the area where the Video is drawn with playvideo (video ; true ; 100 ; 100 ; 200 ; 200) The first two numbers are X and Y and the second two numbers are Width and Height.
    If you don't enter these values the whole gamescreen will be used. You can only play ONE Video File at once.
    Videos are always on the top of the screen.
  • stopvideo ()
    Stops a Video Movie.
  • playswf (Flashmovie)
    Plays a Flash Movie. Because Flashmovies do not have a length you will have to stop them manually with stopswf(). The duration should be handled with moviewait() (see below).
    Optional you can setup the area where the Flashmovie is drawn with playswf (flashmovie ;100 ; 100 ; 200 ; 200) The first two numbers are X and Y and the second two numbers are Width and Height.
    If you don't enter these values the whole gamescreen will be used. You can only play ONE Flashmovie at once.
    Flashmovies are always on the top.
    Important : SWF Files do not work with PaC-DK on 64bit OS so they are not recommended anymore! Use WMV instead.
  • stopswf ()
    Stops a Flash Movie.
  • moviewait (seconds)
    This instruction stops the gameengine for X Seconds. It should be used together with playswf because : Playing a Flashmovie costs much Power especially on slower machines, which could slowdown the game. This could cause a normal wait instruction to last longer as it is supposed to, so the flashmovie would not be stopted at the correkt position.
  • loopsound (name ; volume 1-100)
    Plays and loops a soundeffect. You can have up to 5 loopsounds running equaly. If you want you can enter a volume value.
  • loopstop (name)
    Stopps a looping soundeffect. Loopsound and Loopstop should be used with the on (enter) and on (exit) events of a room.


    Object Commands

  • setobj (instance ; state1 ; state2... ect)
    Sets the state on an object. Optional you can enter up to 10 more states. The object will change the states until it reaches the last entry. You can also use number variables instead of values to set the state of an object. Example : setobj (object ; [number]).
  • instobj (instance ; state)
    Sets the state of an object but only while the mouse is running over it. Used for letting buttons glow when the mouse drives over it. Optional you can enter up to 10 more states.
  • moveobj (instance ; x ; y ; speed or time; wait)
    Moves an object. X and Y is the destination in the room (in Pixel). Speed is a number where 9 is the slowest while 0 puts the object instantly to its destination without movement. You can also enter a timevalue in Milliseconds, like 1000ms, which means the object needs exactly 1 second to reach its destination.
    X and Y can be a number or a variable declared by these brackets [ ].
    Optionally you can enter "wait" to stop a cutscene until the object reaches its destination.
  • group (groupname ; objekc1 ; objekc2 ... object20)
    Defines a group with a maximum of 20 objects in it. This group can be used with setobj and moveobj to move or change all objects within a group at once.
    You can define up to 25 groups.
  • setobjlight (object instance ; R ; G ; B ; fade)
    Changes the color of a roomobject. 255,255,255 means no change while 0,0,0 means completly darkened. If you enter "fade" as the last entry the color will be changed smoothly.
    Can be used for changing for example for changing the color or a lightbulb. You can also use variables to set the RGB values, Example : setobjlight (objectname ; [red];[green] ; [blue]).


    Room Commands

  • loadroom (roomname ; screenchange)
    Loads a room. Only nessecary if you are in a cutscene or no character is selected. If a character is focused the game will always load the room where the character is in (but not in cutscene).
    Also you can enter a screenchange style like "loadroom (room1 ; blend)" if you want to use this effect only this one time.
  • unloadroom ()
    Unloads a room. Can be used for showing messages like "Meanwhile somewhere else"
  • subroom (roomname ; fadetime)
    Displays a room over the current room. A Subroom can be an Inventory or some kind of map that the player looks at very often. It will be displayed over the current room. Caution : The graphics loaded for a subroom remain in systemmemory, so do not make to many of them.
    The event on(enter) for this room will be processed when the subroom appears.
    Also you can enter a time in Milliseconds to let the subroom fade in and out the screen.
  • return ()
    Exits a subroom. This also processes the event on(exit) for this room.
  • setlight (room ; red ; green ; blue)
    Puts a color over a room. With that you can create effects like Lightswitches ect. When the game starts every room is set to (255,255,255).
    "Fade" is optional, which will change the color smoothly. You can also use variables to set the RGB values, Example : setlight (room ; [red];[green] ; [blue]).
  • setpos (room ; x ; y ; true/false)
    Sets the position of the camera in a room. X and Y are Walkmap Coordinates. Only nessecary in cutscenes and when no character is focused. If a character is focused the roomposition always follows this character.
    When TRUE is used as the forth value the roomposition will not scroll to the new position.
    Optional you can enter a fifth value : UP, DOWN, RIGHT or LEFT. This will move the new roomposition over the old one just like in Myst when you turnaround.

    Setpos also works for the rooms used for the taskbar, the anywhere-room and the custommenu, so you can create menues that a bigger than one screen.
  • scrollspeed (1-20)
    Changes the speed with that a rooms scrolls. 1 means very slow, 20 very fast. The default value is 4.

    Special Usage : If you do not want the room position to follow the active character add a 100 to the scrollspeed. Scrollspeed(104) is the same as (4) but without following the focused character.
  • jiggle (seconds ; strength)
    Let the whole screen shake for seconds. Can be used to make explosions ect. Default strength is 10 pixels shaking.


    Character Commands

  • walkto (character ; x ; y ; viewdirection ; dontwait)
    Let a Character walk to a point in the room specified by x and y (on the Walkmap). Instead of a characterinstance you can enter "self" which means the currently focused character. You can also enter a viewdirection the character shall have when arriving at his target : 1 - Down, 2 - Up, 3 - Right, 4 - Left. If you DO NOT enter dontwait the script processing in cutscenes, textscenes and in the Loop Scripts will stop until the character has arrived.
    You can also use variables for X and Y.
  • setwalksound (character ; Soundname)
    Changes the walking sound of a character. With this you can create different effects for different grounds like Snow, Mud ect.
  • stepto (character ; direction)
    Let a character walk one step. "Direction" can be : RIGHT, LEFT, UP, DOWN.
  • follow (character1 ; character2 ; dontwait)
    Let a character walk to the position of another character. If you DO NOT enter dontwait the script processing in cutscenes, textscenes and in the Loop Scripts will stop until the character has arrived.
    Instead of a characterinstance you can enter "self" which means the currently focused character.
  • beamto (character ; room ; x ; y ; viewdirection)
    Sets a character to the position x/y (Walkmap) in the specified room instantly. You can also specify the viewdirection the character shall have (1-4). Use this to move a character into another room.
    Instead of a characterinstance you can enter "self" which means the currently focused character.
    You can also use variables for X and Y.
  • lookto (character ; 1-4 or character2)
    Changes the viewdirection of a character. You can enter a direction 1-4 or a name of another character to look at. Instead of a characterinstance you can enter "self" which means the currently focused character.
  • speech (character ; text ; sample ; dontwait)
    Let a character speak. Instead of a characterinstance you can enter "self" which means the currently focused character. Optional you can enter a speechsample. If you specify a speechsample the speaktime of the character is the length of the sample. If no sample is provided the speaktime is dependent on the textlength and the textspeed in the gameoptions. If you DO NOT enter dontwait the script processing in cutscenes, textscenes and in the Loop Scripts will stop until the character stops speaking.
  • offspeech (x ; y ; text ; sample ; dontwait)
    Creates a speaktext independent to a character. The text appears at the position x/y (Walkmap Position!!), this position is the lower/middle of the text. Optional you can enter a speechsample. If you specify a speechsample the speaktime of the character is the length of the sample. If no sample is provided the speaktime is dependent on the textlength and the textspeed in the gameoptions. If you DO NOT enter dontwait the script processing in cutscenes, textscenes and in the Loop Scripts will stop until the offspeech is over.
  • pickup (character)
    Let a character do his Pickup Animation. Instead of a characterinstance you can enter "self" which means the currently focused character.
  • setchar (characterinstance ; action1 ; action2... ect)
    Sets the action of a character. Here you can use the extra actions which you can edit in the characterwindow. Optional you can enter more than one action. These will be played afterwards. If all specified actions have finished the character does the last action before you have called setchar.
    Usally you enter a number between 1 and 20 here but you can also enter the name used for the extra-animation like "Extra 3" or "Grin"
  • runto (character ; x ; y ; viewdirection ; dontwait)
    Let a Character run to a point in the room specified by x and y (on the Walkmap). Instead of a characterinstance you can enter "self" which means the currently focused character. You can also enter a viewdirection the character shall have when arriving at his target : 1 - Down, 2 - Up, 3 - Right, 4 - Left. If you DO NOT enter dontwait the script processing in cutscenes, textscenes and in the Loop Scripts will stop until the character has arrived.
    You can also use variables for X and Y.

    Note : You can change the running speed with runspeed
  • runspeed (speed in %)
    Sets the running speed for the instruction runto in procent. Possible values are 50% - 300%.
  • loadchar (character)
    Loads the images of a character into the systems memory. This is only necessary to prevend loading delays when a character appears in a room. You can use this instructions before you load a room.
  • switchchar (character1 ; character2)
    Exchanges the position, size and inventory of two characters. This can be usefull if you have a character that can change his form or wearing.
  • setcharlight (character ; R ; G ; B ; fade)
    Changes the color of a character. 255,255,255 means no change while 0,0,0 means completly darkened. If you enter "fade" as the last entry the color will be changed smoothly.
    Can be used for letting a character step out of the dark. You can also use variables to set the RGB values, Example : setcharlight (character ; [red];[green] ; [blue]).
  • charzoom (character ; size in %; fade)
    Changes the size of a character. Possible sizes are 10% till 300%. If FADE is used the sizechange will be smooth.
  • stopzooming (character ; true/false)
    A character will not change his size anymore until stopzooming is set back to false. Usage-example : A ledder where the character walk up but shall not zoom back. Some stopzooming instructions in the walkmap at the bottom of the ledder will do it.
  • linkchar (character ; objekt)
    Links a Character to an object and its movement. During this link the character can't be controlled by the player and there won't be any walkanimation. This function can be used to create an elevator in a room. (See "Creating an elevator" under "Advanced Stuff")
  • unlinkchar (character)
    Unlinks a connection between a character and an object.


    Item Commands

  • setitem (item ; state)
    Changes the state of an item, like setobj it can also be used with more than 1 states like setitem(item1 ; 2 ; 3 ; 4).
    The state of an item affects all instances of this item in the game.
  • additem (character ; item ; 1-5)
    Adds an item to the inventory of the focused character. Instead of a characterinstance you can enter "self" which means the currently focused character. If you enter "off" the item will be added to a generell inventory. Instead of an itemname you can enter givelink which means the item that was previously used with the command givelink ().

    Every character has 5 different Inventories. To add an item to another than the first Inventory add a number between 1 and 5 to the additem instruction. If you do not enter this third value the item will be added to the first inventory.
  • delitem (character ; item ; 1-5)
    Deletes an item from the ionventory of the focused character. Instead of a characterinstance you can enter "self" which means the currently focused character. If you enter "off" the item will be deleted from a generell inventory. Instead of an itemname you can enter givelink which means the item that was previously used with the command givelink ().

    Every character has 5 different Inventories. To delete an item from another than the first Inventory add a number between 1 and 5 to the delitem instruction. If you do not enter this third value the item will be deleted from the first inventory.
  • showinventory (1-5)
    With this you can switch between the 5 inventories every character has.
  • exchange (character1 ; character2)
    Exchanges the complete inventory between two characters. Instead of a characterinstance you can enter "self" which means the currently focused character.
    Example : If you create a room where you view your character from above then technically this is another character in the game. When changing the room you can exchange the inventories between these characters, so the player does not recognize he is controlling another character.
  • inv_up (amount)
    Scrolls down in the current inventory. Amount should be the width of the inventoryfield.
  • inv_down (amount)
    Scrolls up in the current inventory. Amount should be the width of the inventoryfield.
  • link (linkname)
    Enables a combination of two objects. This works in that way : In the first object you fill in the scriptpart on (use) and link (linkname). This adds a "with" to the actionline and the active gamecommand is set to "link". The second object now has a part in it with on (link). Then you should check with if_link (linkname) if the right object was linked.
  • givelink ()
    Givelink() works almost like link. The actionline will be added with a "to". Givelink is supposed for giving items to another character. You don't have to fill in something. With Givelink() the current item is automaticly saved. The Destinationcharacter then must have the scriptpart on (givelink) where you exchange the item. Go to the "standard stuff"-section for a complete description.


    Special FX

  • enablefxshape (true / false)
    Enables of disables all FX-Shape Effects in the game.
  • stopeffect (effect / all)
    Stops an effect. With "all" you can stop all effects.
  • starteffect (mirror)
    Mirrors the whole screen.
  • starteffect (flip)
    Flips the whole screen.
  • starteffect (slowmotion ; 50 - 99 ; fade)
    Create a slowmotion effect. The Speed can be 50 - 99%. With "Fade" you can change the speed slowly. Music, sounds and speechsamples will be pitched too!!
  • starteffect (scanlines ; 1-99 ; fade)
    Shows a scanlines effect (like on a TV). The visibility can be 1 - 99%. "Fade" will let this effect fade in slowly.
  • starteffect (fog ; 1-99 ; fade)
    Creates a fog effect on the screen. The visibility can be 1 - 99%. "Fade" will let this effect fade in slowly.
  • starteffect (noise ; 1-99 ; fade)
    Shows a noise effect (black & white). The visibility can be 1 - 99%. 99% is like a white noise effect on a TV. "Fade" will let this effect fade in slowly.
  • starteffect (colornoise ; 1-99 ; fade)
    Shows a colored noise effect. The visibility can be 1 - 99%. "Fade" will let this effect fade in slowly.
  • starteffect (monitor ; 1-99 ; fade)
    Shows a CRT Monitor effect. The visibility can be 1 - 99%. "Fade" will let this effect fade in slowly.
  • starteffect (super8)
    Lets the screen look like an old camera.
  • starteffect (blur)
    Blurs the whole screen. This effect turns off "pixelate".
  • starteffect (pixelate ; 1-3)
    The name says it : 1 = 2x, 2 = 4x und 3 = 8x. This effect turns off "blur".
  • starteffect (motionblur ; 1-50)
    Shows a motionblur effect.
  • starteffect (drugged ; 10-500)
    Verzerrt das Bild wie auf Droge.
  • starteffect (bloom ; 1-50 ; fade)
    Shows a bloomeffect on the screen with an intensity of 1 - 50. With "fade" the effect will be animated. Bloom, Darkbloom, Whoosh, Art and Hell turn off each other.
  • starteffect (darkbloom ; 1-50 ; fade)
    Shows a darkbloomeffect with an intensity of 1 - 50. With "fade" the effect will be animated. Bloom, Darkbloom, Whoosh, Art and Hell turn off each other.
  • starteffect (whoosh ; 1-50 ; fade)
    Shows an effect like in NeedFor Speed with NOS with an intensity of 1 - 50. With "fade" the effect will be animated. Bloom, Darkbloom, Whoosh, Art and Hell turn off each other.
  • starteffect (art)
    Let the screen look like a painting. Bloom, Darkbloom, Whoosh, Art and Hell turn off each other.
  • starteffect (hell)
    Colors the screen a bit hell-like. Bloom, Darkbloom, Whoosh, Art and Hell turn off each other.
  • starteffect (heat ; fade)
    Shows a heat effect on the screen. Cannot be used with the previous 8 effects.
  • starteffect (underwater)
    Shows an underwater effect on the screen. Cannot be used with the previous 9 effects.
  • starteffect (classicdark)
    This effects will make everything black except the characters who will be grey. This effect is meant to imitate the darkness of some classic games like Maniac Mansion.
  • starteffect (whiteflash ; IN ; OUT)
    Makes the screen fade into white. IN and OUT are millisecond values. Important : The screen will be white until you end this effect with "stopeffect".
  • starteffect (zoom ; X (Pixel) ; Y (Pixel) ; Zoom in % ; fade/fadeslow)
    Zooms into the screen to the point X/Y. The third value defines how far in %. If "fade" or "fadeslow" is provided the picture will zoom in and out slowly instead of immediatly.
  • starteffect (lightning ; 1-10 ; x1; y1 ; x2 ; y2 ; R ; G ; B ; Spikes 1-20 ; height ; delay)
    Creates a lightning effect. You can start up to 10 lightningeffect at a time. x1,y1,x2,y2 define the start and endposition and R,G,B the color.
    Spikes and Height will variate the effect itself.
    Delay is the speed of the effect. 0 = very fast, 5 = rather slow.


    Text Commands

  • textout (1-1000 ; Text ; x ; y)
    Creates one out of 1000 possible permanent (!) textlines within the screen, which can be disabled with texthide. The position X and Y is given in Pixels. Its also possible to specify a font and a color for a single textline, in this way :

    textout (1-100 ; Textline ; x ; y ; Font ; red ; green ; blue)

    Other uses of Textout :

    textout (1-1000) ..... Enables a previously disabled line without changing the values.
    textout (1-1000 ; -1 ; -1 ; -1 ; 3) ..... This only changes the used font without changing Text and Position.
    textout (1-1000 ; -1 ; -1 ; -1 ; -1 ; 230 ; 120 ; 200) ..... This only changes the color.

    Note : If a stringvariable is used as Text it is enough to change this string. The appropriate textline will be changed then too.

    Note 2 : Useally Textout-Lines are positioned absolute on the screen no matter which room is loaded. With Bindtext you can bind single textout-lines to a single room or even to the taskbar or the custommenu. These textlines will be only visible in these rooms and they scroll with them, too.
  • texthide (1-1000)
    Hides a specified textline.
  • bindtext (1-1000 ; Room)
    Binds a textout-line to a single room. This textline will only be visible in this rooms and it moves with its position. Instead of a room you can also use : any = Anywhere Room, taskbar = Your Taskbar, menu = Your Custom-Menu.
    You can also specify a room that you will use as a subroom.
  • textalign (1-1000 ; left / middle / right)
    Defines the alignment of a textoutline.
  • showalltext ()
    Makes all textlines visible.
  • hidealltext ()
    Hides all textlines.
  • movetext (1-1000 ; x ; y ; speed or time; wait)
    Moves a textoutline. X and Y is the destination in the room (in Pixel). Speed is a number where 9 is the slowest while 0 puts the textline instantly to its destination without movement. You can also use a time in milliseconds instead like 1000ms, which means the text needs exactly 1 second to reach its destination.
    X and Y can be a number or a variable declared by these brackets [ ].
    Optionally you can enter "wait" to stop a cutscene until the textline reaches its destination.
  • entertext ([string] ; x ; y ; font ; maxletters ; red ; green ; blue)
    Creates a field to enter a textline. X and Y define the position in pixels on the screen.
    The first entry can be done in two ways : Just use [stringname] and the entered text will be saved in this string variable. It can also have this form : "Enter Text : [stringname]". In this case "Enter Text : " is displayed at the beginning.

    Just as in Textout you can also select a font and a color. "Maxletters" defines how many letters may be entered by the player. If nothing of this is provided the engine uses the standards.

    Importent : Except for the Loop1 Scriptevent ALL other scripts will be stopped during Text-Entering. The ENTER and ESCAPE Key will stop it.
    There is an example for entering textlines on the PaC-DK Homepage for you to download.
    Note : To check if the entered string is empty use : if_string (string ; [empty])


    Scenes & Game Commands

  • cutscene (name)
    Starts a cutscene (which is a script you have created in the tool) which will be processed completly. During a cutscene the walkmapscripts will not be processed, the Taskbar and the Mouseicon disappear and the Roomposition will NOT automaticly be set to the focused character position.
    Optional you can enter "donthide" as a second value. This will leave the taskbar and Anywhere-Objects visible while a cutscene is running.
  • function (scriptname ; loops)
    Executes a script (without going into cutscene mode). A Script-Function is useful if you have scriptparts that will be used more than once in different locations in your game, it prevends you from copy/pasting scriptlines over the whole game.
    Usually a function will be executed once. You can also specify how often this function will be repeated. A "*" or "infinitly" will run the function again and again until you stop it with stopfunction

    Function (name ; loop2) will start a function in loop2 mode, which means it will behave exactly as an on (loop2) event.
  • stopfunction (scriptname)
    Stopps a looping function.
  • minicut ()
    This instruction can be used at the beginning of an on (use) or on (click) scriptevent for example. It will cause this event to be handled like a cutscene. So its not necessary any more to create cutscenes when you only want to use some speech instruction ect.
    After minicut () "Wait" works and the game will wait when you use Speech or Offspeech.
    Optional you can enter "donthide" as a value. This will leave the taskbar and Anywhere-Objects visible while a cutscene is running.
    Note : minicut() does not work in room- and walkmapscripts.
  • wait (seconds)
    Stopps the scriptprocessing for an amount of seconds (you can also use "real" numbers like wait(2,3))
    Wait normally only works in cutscenes,functions, textscenes and the Loop-Events in the roomscripts.

    If you wanna use WAIT in events like (for example) on (use) you have to use the instruction minicut() before. This instruction will cause the event to be handled like a cutscene.
  • stopskip ()
    If the player interrupts a cutscene by pressing ESC the cutscene will continue at this point. This can be used to split a cutscene into several parts that must be "escaped" by the player each.
  • showinfo (text ; true/false)
    Used with on (mouse). The specified text is the text that will be shown in the actionline. If you enter TRUE as second entry the text will also be displayed next to the mouseicon. This you should use when you created a mousecontrolled game.
    Showinfo is strictly nessecary to let the object/character/item receive on (your command) events.

    Important!! Showinfo HAS TO BE used with objects to enable commands like on(look) or on(use)! Even if you don't use any textlines in your game. It is neccessary for the game to seperate a game objecz from a controlobject. Otherwise you would be able to use a commandbutton with another button.
  • showmouse (true/false)
    Makes the mouse visible/invisible in a normal game situation, for example : You could use a crosshair in a minigame.
  • enablemouse (true/false)
    Enables or disables the mouse in a normal game situation, useful for creating Boxing sequences like in Indy4 for example.
  • taskbar (true/false)
    Enables or disables the taskbar (GUI).
  • enablemenu (true/false)
    Enables or disables the MainMenu in the game.
  • realtime (true/false)
    Changes the behavior of scripts and is by default enabled. If it is true the Mainscript and all loopscripts will be processed each frame completly!!
    If it is false only 5 lines are being processed each frame.
  • popupcoin ()
    Makes your coin-interface appear. Only necessary if autopopup was disabled for the coinmenu.
  • setlanguage (language)
    Selects one of the languages that were created with the translator tool. "origin" selects the origin language used in the scripts.
  • textscene (name)
    Begins a Textscene. To create a textscene you'll have to use scripts in the editor.

    You can also provide Position(X/Y) and Width data (in pixels!) like : textscene (name ; 200 ; 100 ; 250)
    On how to make a textscene read the "standard stuff" section.
  • endscene ()
    Ends a textscene.
  • activate (textscene ; level ; row)
    Activates a row in a level of a textscene. Instead of a textscene name you can enter "self" which means the current ACTIV textscene.
  • deactivate (textscene ; level ; row)
    Deactivates a row in a level of a textscene. Instead of a textscene name you can enter "self" which means the current ACTIV textscene.
  • gotolevel (level)
    Switches to another level in the current textscene. When starting a textscene the level is always 1.
  • textscenestyle (USETEXT / USEITEM)
    With this you can select if you want to use Textlines or Items in a textscene, so you can use both styles in one game.
  • timer (seconds)
    Timer delay a scriptcommand for the amount of seconds. The command that shall be processed delayed must stand right after the Timer Command. Each timer can only delay ONE single command.
  • break ()
    Break exits the processing of a script. Break stops all single scripts like on() events, cutscenes and resets all looping scripts like functions, the mainscript and the on(loop) event.
    This command is supposed to be used as an ELSE-Event.
    Example : The first part of a script depends on an objectstate like if_obj (bla ; 3). The following part ends with break() But if if_obj (bla ; 3) was not OK the next part is being processed instead.

    Notice : An "ifnot" command can be an alternative to Break.


    Save & Load Menu

  • restart ()
    Restarts the whole game. Only for your game ending.
  • quit ()
    Ends the game, without confirmation.
  • savegame (slot)
    Saves a game in the specified Slot (1-10)
  • loadgame (slot)
    Loads a game from the specified Slot (1-10)
  • textenabled (true/false)
    Enables / Disables the ingame text for dialogs.
  • textspeed (fast / normal / slow)
    Determines the textspeed for all dialogs that do not use speechsounds.


    Particles

  • setparticles (objekt ; speed ; amount ; direction ; rotation ; variation)
    Defines the particle effect. Look into "Advanced Stuff" for more information.
  • particleview (1-4)
    Sets the rendermode for particles : 1 = In front, 2 = Behind "Front" Objects, 3 = Behind "Middle" Objects, 4 = "Behind the Backgroundimage" (for this you will have to use a transparent background image)
  • startparticles ()
    Starts the Particle Effekt. If fast is added the particles appear immediantly.
  • stopparticles ()
    Stops the Particle Effekt. If fast is added the particles disappear immediantly.