Actions


Notes about Actors:
- The "Event Actor" is the Actor that currently receives the event.
- If an Actor's name is selected, all of the Actor's clones will receive the action.
- If the "Collision Event" is selected, the "Collide Actor" is the Actor that currently collides.
- An Actor's  Action is immediately  executed when an Event occurs, or it can be put in a queue, to be executed when certain   frames of a specified animation are displayed.

Action execution:

Clicking the "Add" button for all Actor Actions, enables you to choose if an action will execute immediately at an event's occurrence, or if the action will be executed at a specific frame: "Wait for Frame".

Animation: Select an Actor Animation
Frames:
Enter the frame numbers where the action should happen. (For Example: 14;2...)
Specify whether only the last action in the queue must be executed.


Game Editor supports the following actions:
Change Animation:

Change the current Actor's Animation.

Actor: Select the Actor that will have its animation changed.
Animation:
Select the Actor's Animation.
Direction:
Specify whether animation starts in normal, reverse or stopped mode.

This action will change the animindex variable.

script function

Change Animation Direction:

Change the current Actor's Animation Direction.

Actor: Select the Actor that will have its animation direction changed.
Direction:
Specify whether the animation will start in normal, reverse or stopped mode.

script function

Change Cursor:

Change the current Actor's Mouse Cursor.

Actor: Select the Actor.
File:
Select image file (Load tga, jpeg, bmp, png, xpm, xcf, pcx, jpg,or tif image files).
Horizontal Frames:
Enter the number of horizontal frames.
Vertical Frames:
Enter the number of vertical frames.
Hotspot X:
X coordinate of the Cursor hot spot.
Hotspot Y:
Y coordinate of the Cursor hot spot.

script function

Change Parent:

Change the selected Actor's Parent.

Child: Select the Child Actor.
Parent:
Select the Parent Actor.

script function

Change Path:

Change the selected Actor's Path.

Actor: Select the Actor that will have its path changed.
Path:
Select a path (options include: any path that you have previously created, "no path" and "random path").
Axis:
Specify whether this path affects x axis, y axis or both axis.

script function

Change Transparency:

Change the selected Actor's  Transparency.

Actor: Select the Actor that will have its transparency changed.
Transparency:
Set the amount of transparency using the slider bar. Slide the bar to the right for greater transparency
and to the left for less transparency.

script function

Change Z Depth:

Change the selected Actor Depth.

Actor: Select the Actor that will have its position changed relative to the Z axis.
Z Depth:
Set the amount of depth using the slider bar. Slide the bar right for greater
depth and to the left for less depth.

script function

Collision State:

Enable or Disable  collisions on selected Actor.

Actor: Select the Actor.
State:
Enable or disable.

script function

Conditional Action:

Call Actions if Expressions match certain Conditions.

Expression 1 and Expression 2: Expressions that will be compared.
Condition:
Equal, Greater Than, Less Than, Greater or Equal To, Less or Equal To.
The drop down lists show Actors and variables that can be used in the comparison.

Create Actor:

Put a new Actor in the game.

Actor: New Actor's name.
Animation:
Animation name.
Parent:
Select an Actor's parent (options include any previously created Actor, the "view" Actor, and "no parent").
Path:
Select  a path
(options include: any path that you have previously created, "no path", and "random path").
x,y:
Set the coordinates of a New Actor's initial position.
Relative to creator:
True or false.

script function

Create Timer:

Create a Timer for the selected Actor.

Actor: Select the Actor.
Timer:
Select the timer.

If you wish to specify a new timer, select "New Timer".

Name: New timer name.
Time:
Timer interval in milliseconds.
Type:
Periodic or Random timer.
Min time:
For Random timers, specify the minimum timer interval here and the maximum timer interval in the Time field.
Repeat:
"Forever" or "Specify Quantity".
Count:
If the timer is not set to "Forever", set number of repetitions here.

script function

Destroy Actor:

Destroy the selected Actor.

Actor: Select the Actor to be destroyed.

script function

Destroy Timer:

Destroy the selected Timer.

Timer: Select the Timer to be destroyed.

script function

Event Disable:

Disable a specified Event.

Actor: Select the Actor.
Event:
Select the Event to be Disabled.

script function

Event Enable:

Enable a specified Event.

Actor: Select the Actor.
Event:
Select the Event to Enable.

script function

Follow Mouse:

Make the Actor Follow the Mouse.

Actor: Select the Actor that will follow the mouse.
Axis: Specify if this path affects "x" axis, "y" axis, "both" axis or "none" axis (end following).

script function

Move To:

Move the Actor to a specified position, at a specified velocity.

Actor: Select the Actor.
x, y:
position in game coordinates.
Velocity:
movement velocity/speed. (Higher number = greater speed)

script function

Physical Response:

Physically Move an Actor after a Collision Event.

Move: After collision, move "Event Actor Only", "Collide Actor Only" or "Both Actors"
Mass: Select "Use Calculated" to use the internally calculated mass. Select "Specify" to manually enter an Actor's mass.
- Event Actor: Enter the Event Actor's mass in "Specify" mode or the Event Actor's mass multiplier in the "Use Calculated" mode.
- Collide Actor:
Enter Collide Actor's mass in "Specify" mode or the Collide Actor's mass multiplier in the "Use Calculated" mode.

Final velocity multiplier:
- Event Actor:
Event Actor's calculated velocity multiplier.
- Collide Actor:
Collide Actor's calculated velocity multiplier.

script function

Play Music:

Play selected music upon an Event.

File: Select music file (Load wav, mid, ogg, mp3, mod, s3m, it, or xm music files).
Web:
Use the web button to get more music resources on the Internet.
Volume:
Set music volume.
Loop:
Set loop count (1 to 65000)
Startup Priority:
In slower machines, like PDA devices, the music may load very slowly. Setting the "Startup Priority" for your machine will help to address the speed issues.

- High: The game stops while the music loads, but is the fastest music mode.
- Medium: The game doesn't stop while the music loads, but this mode can be slow.
- Low: The game will play in normal velocity, but the music load will be slow.

Notes:
- Music files are not entirely loaded into memory.
- Only one music will be played at a time.


script function

Play Sound:

Play a selected Sound upon an Event.

File: Select a sound File (wav, voc, iff audio files).
Web:
Use the web button to get more sound resources on the Internet.
Volume:
Set the sound "Volume".
Pan:
Set the sound "Pan".
Loop:
Set the loop count (1 to 65000).
The maximum simultaneous sound must be adjusted in "Game Properties" panel.

script function

Script Editor:

Enter a C Script to be executed upon an Event.

The buttons at the bottom of the Script Editor's screen are selected in order to choose Actors, variables, and functions that will be automatically placed in the Script Editor.
For Example, selecting an Action Function from the  "variable/functions" list, causes a respective Action dialog box to  pop-up. Left clicking a Function choice, will automatically place the function in the script.

Variables:  Selecting this button allows you to add, edit, or remove your variables. All variable attributes, excepting the variable name, can be edited.

Add:

Name: Variable name. Variable names must begin with characters and must be followed by characters, numbers or '_'. Script Function names and Vars names are not already assigned. They cannot be used in the "New Variable" Name. (Example: int MyNewActor; OK ................ int CreateActor; Not OK)
Variable type:
Integer, real (float point number) or string.
Variable visibility:
Global or Actor variable. Actor variables extends the Actor struct. Thus, an Actor variable can be accessed in the same way as the internal Actor variables. For example, use local Actor variables to make things like "Player Power".
Array: You can create global array variables with this option. Your index will be between zero and size.
Save group: If you want save or load this variable with saveVars and loadVars functions, set here the group were this variable will be saved


File: Save and load Script Editor scripts.
Web:
Use the web button to get more C scripting resources on the Internet.

Global Code: Global Code can be accessed by any script. Use the Global Code Editor to freely add any C code (arrays, structs and functions).

After entering your code, enter a name for it and click in "Add" button.
Edit a code by selecting it in "Choose" list. After completing the necessary changes, click on "Add" button.
Use the "Remove" button to delete a Global Code script.
Use the "File" button pop-up dialog to save or load Global Code scripts.

Note: changing any of the internal Actor's variables has no effect on the Global Code.

 

Set Text:

Set or change the Actor text. See text actor.

To Anterior Position:

Send the Actor to the Anterior Frame Position.

Actor: Select the Actor.

script function

Visible State:

Show or Hide the selected Actor.

Actor: Select the Actor.
State:
"Enable" (show the Actor), "Disable" (hide the Actor) and "Don't draw, but allow events" (use to speed up collision map Actors).

script function