Copyright: Corel
Citation: Klik & Create


Actions

Actions are used to bring your games to life. Once an event has been detected, you can perform an appropriate Action to create or destroy an object, play a sound effects, or jump to a new level.

Along the top line of the Event Editor, you'll see a series of icons representing the available action types:

Enter your actions by clicking a grid box under an icon with the right mouse button. Choose the desired action from the pop-up menu.

If the box has already been assigned some actions, the menu will include the following options:

Edit

Use the Edit action to edit any of the actions that have already been defined.

Delete

Use the Delete action to edit any of the actions that have already been defined for a grid box..

Ordering your actions

Generally, the actions will be performed from left to right, exactly as they appear on the screen. However, you can change the order of the actions by either dragging and dropping the Action icons, or clicking an event number with the right mouse button and choosing Edit the Actions to display the Action Order Editor.


Action List

The built-in actions are:

Special actions

Change a Global Value

Execute an External program

Activate Group

Deactivate Group

Enable (Game Menu)

Disable (Game Menu)

Check (Game Menu)

Uncheck (Game Menu)

Sound Actions

Play sample

Play and loop sample;

Play music

Play and loop music.

Stop any sample playing

Stop any music playing

Storyboard Actions

Next level

Previous level

Jump to level

Restart the current level

Restart the Game

End the Game

Scrollings

Create object actions

Create object

Mouse and Keyboard actions

Hide Windows mouse pointer

Show Windows mouse pointer

Player actions

Score

Lives

Player Control

Active object actions

Movement (also used by FLI, MPEG, QuickTime, and Video for windows)

Stop

Start

Set Speed

Set Maximum Speed

Wrap Around Play area

Bounce backwards

Reverse

Animation

Stop

Start

Change

Restore

Paste Image into background

Bring to front

Bring to Back

Position(also used by FLI, MPEG, QuickTime, and Video for windows

Select Position

Swap position with another object

Set X coordinate

Set Y coordinate

Direction

Select direction

Look in direction of

Movement

Visibility

Make object invisible

Make object visible

Flash object

Shoot an object

Destroy

Values

Set Value

Add to Value

Subtract from Value

Spread a value

Flags

Set Flag On

Set Flag Off

Toggle

Text object actions

Display Text

Erase Text

Flash Text

Set Color of Text

Set Paragraph

Next Paragraph

Previous Paragraph

Alterable String

Change Alterable String

Question and Answer actions

Ask the question

Counter object actions

Set Counter

Add to Counter

Subtract from Counter

Hiscore object actions

Ask for a player's name

Reset

Change one name

Change one score

Position / Select PositionPosition / Set Horizontal PositionPosition / Set Vertical PositionVisibility / Make object invisibleVisibility / Make object reappearDestroy

Ini object actions

Set Current File

Set Current Group

Set Current Item

Set Value

Set String

Save Position of object

Load Position of object

Destroy

Edit object actions

Files / Load text file

Files / Load text file via a selector

Files / Save text file

Files / Save text file via a selector

Editing / Set text

Editing / Block / Replace selection

Editing / Block / Cut

Editing / Block / Copy

Editing / Block / Paste

Editing / Block / Clear

Editing / Undo / Undo

Editing / Undo / Clear Undo buffer

Control / Limit text size

Control / Focus / On

Control / Focus / Off

Control / Enabled / On

Control / Enabled / Off

Control / Read only / On

Control / Read only / Off

Control / Force Text modified flag / On

Control / Force Text modified flag / On

Control / Aspect / Set Text via a selector

Control / Aspect / Set background color via a selector

Position / Set position

Position / Set horizontal position

Position / Set vertical position

Size / Set horizontal size

Size / Set vertical size

Visibility / Make object Reappear

Visibility / Make object Invisible

Destroy

Button object actions

Change Text

Highlight

Dehighlight

Set Radio Button / Change text

Set Radio Button / Select a radio button

Set Radio Button / Enable a radio button

Set Radio Button / Disable a radio button

Position / Select position

Position / Select horizontal position

Position / Select vertical position

Size / Set vertical size

Size / Set horizontal size

Visibility / Make object invisible

Visibility / Make object reappear

Special Video for Windows actions

Play / Forward

Play / Backward

Play / Step by step (in frames)

Play / A New file

Play / A New file via a file selector

Stop

Pause

Resume

Set AVI Play position to. / Beginning

Set AVI Play position to. / End

Set AVI Play position to . / A Frame number

Set AVI Play position to. / A Time Position

Size / Set Horizontal Size

Size / Set Vertical Size

Visibility / Make object Invisible

Visibility / Make object Reappear

Destroy

Special QuickTime actions

Play / Forward

Play / Backward

Play / Step by step (in frames)

Play / A New file

Play / A New file via a file selector

Play / Looping On

Play / Looping Off

Stop

Pause

Resume

Set QuickTime Play position to. / Beginning

Set QuickTime Play position to. / End

Set QuickTime Play position to. / A Time Position

Set Volume

Tracks / Enable Video trackTracks / Disable Video trackTracks / Enable Sound trackTracks / Disable Sound trackTracks / Enable Text trackTracks / Disable Text trackTracks / Enable Music track

Tracks / Disable Music trackTracks / Enable MPEG trackTracks / Disable MPEG trackSize / Set Vertical Size

Size / Set Horizontal Size

Visibility / Make object Invisible

Visibility / Make object Reappear

Destroy

Special FLI object actions

Animation / Start

Animation / Stop

Animation / Pause

Animation / Resume

Animation / Change Frame Duration

Animation / Goto Frame

Animation / Next Frame

Animation / Previous Frame

Visibility / Make object Invisible

Visibility / Make object Reappear

Destroy

Special MPEG actions

Play / Forward

Play / Backward

Play / Step by step (in frames)

Play / A New file

Play / A New file via a file selector

Stop

Pause

Resume

Set MPEG Play position to. / Beginning

Set MPEG Play position to. / End

Set MPEG Play position to . / A Frame number

Set MPEG Play position to. / A Time Position

Size / Set Horizontal Size

Size / Set Vertical Size

Visibility / Make object Invisible

Visibility / Make object Reappear

Destroy

CD objects actions

Play a TrackPlay track & continue

Play at position

Stop

Pause

Resume

Previous TrackNext track

Open Door

Close Door

Destroy

MCI  object actions

Send a command

Destroy

Picture actions

New pictureNew picture from selectorImage resize onImage resize off Visibility / Make object invisibleVisibility / Make object ReappearDestroy

Mixer object actions

Change wave volume

Change wave left volume

Change wave right volume

Change FM synthesizer volume

Change FM synthesizer left volume

Change FM synthesizer right volume

Change square wave synthesizer volume

Change square wave synthesizer left volume

Change square wave synthesizer right volume

Destroy


Special Actions

Click a grid box under the Special Actions icon to display a menu with the following options:

Execute an External program

Change a Global Value

Group of Events / Activate

Group of Events / Deactivate

Game Menu/Enable

Game Menu/Disable

Game Menu/Check

Game Menu/Uncheck


Execute an External Program

Use Execute an External Program to call ANY program from your GF game. When the called game finishes, you'll be returned to the current level.

There's no need to worry about the technicalities. The Games Factory will test your program carefully before it is run. If there's a problem, the action will be disregarded, and your game will continue from where it left off.

There are lots of possible uses for this action. In an adventure, you could assign the Windows Notepad to a button. Users could jot down their ideas at any time, and save them to the disk. Software houses could provide a guided tour of their product range with an exciting mix of video clips and real demonstrations. Magazines could install the programs from their cover-disk.

There are two ways to enter your program details:

1.  If you already know the location of the program, type the name and path directly into the "Program to Execute" box.

Here are a few examples from Windows 3.1:

C:\DOS\DISKCOPY.COM  Makes a backup copy of your floppy disk.

C:\WINDOWS\NOTEPAD.EXE  Displays the Windows notepad.

C:\WINDOWS\CLOCK.EXE  Displays the Windows clock.

You might need to change the directories for your own system, but you get the idea.

2.  If you'd prefer to choose the program from the screen, click the Browse button to display a file selector.

Some programs need additional information. The Command line box supplies some optional text which will be passed to your external game. The Command Line might hold the name of a graphics file you wish to display or the drive you wish to format.

The Game Behavior check boxes change the way your program will be run.

Wait for end

If this check box is enabled, your game will pause until the external program has finished. If this option is disabled, the game will run neatly in the background.

Hide game

If this check box is enabled, your game will be removed from the screen while the other game is running. When the program ends your game will be returned to the screen.

Note: If the external program cannot be found, an error will result and the action will have no effect. Your level will continue running as if nothing had happened.


Change a Global Value

Change a Global Value changes one of your Global Values in the game. The Games Factory provides sixteen of these values, numbered from 1 to 16 for each object. Unlike normal Counter objects, which are usually destroyed at the end of each level, Global Values remain in existence for the duration of your game. They provide a fast way of passing values between levels, without the bother of creating a Global Counter.

After selecting this action, select the Global Value Number from the pull-down menu, or type the number into the box provided.

Select one of the three Change Required buttons:

Set Value  Sets the Counter to a completely different value.

Add to Value  Adds a value to your Counter.

Subtract from value  Subtract a values from your Counter


Set a Global Value

Set a Global Value sets the selected Global Counter to your chosen value. You'll be asked it enter this value in the box.


Add to a Global Value

Add to a Global Value adds the chosen value to a Global Counter. Choose the counter from a pull-down menu. There are sixteen Counters available, numbered from one to sixteen.


Subtract from a Global Value

Subtract from a Global Value subtracts your value from the selected Global Counter. Choose the counter from a pull-down menu. There are sixteen Counters available, numbered from one to sixteen.


Group of Events

Group of Events actions are used to switch your event groups on or off. If they're on, all the conditions and actions will be performed as normal. If you turn them off, the entire event group will be ignored.

This feature lets you allocate specific event groups for the different needs of your game. You can assign a dozen events to a single button, and call them up using a single mouse click. This feature is useful for creating separate event groups for each possible outcome in an adventure game.

There are two Group of Events actions:

Activate Group

Deactivate Group

The following games outline some of the uses for Group of Events actions.

Tailoring an Educational game to the user

Educational games need to be playable by a range of different age groups. A puzzle which will be challenging for a four year old may look extremely easy when the user is six.

You can use Group of Events to create different problems for each age range. These problems can be placed in their own event groups, and selected using a menu in your game.

Note: You can test whether a group is working by calling the Check Activation Condition from the Special menu.

Switching between the control panels in an adventure

Supposing you wanted to list the character's possessions in a window. You could create the selector using a Group of Events action, and activate it when the user clicks the Inventory button.

Triggering a trap in a platform game

Place the trap events into a group and activate this group when the player enters a certain screen zone.

Controlling the difficulty mode in an arcade game

Each difficulty mode could have its own Event Group which could be activated or deactivated in your game. Easy mode could have all the objects moving slowly and give the player extra lives. Hard mode could speed up the attackers and add additional monsters.


Activate an Event Group

Activate an Event Group is used after a Deactivate an Event Group command to start the event group working again. All the conditions will be now be tested regularly. If they are True, the appropriate actions will be performed.

When you select this action, you'll be presented with a dialog box so that you can enter the event group to be activated. Pick an event group by highlighting it with the mouse, and click OK.

The events are automatically assigned a number by the computer. This number is displayed in brackets to the left of the name.

As a rule, your event groups will be activated automatically at the beginning of the level. You can override this by changing the Active when level starts option from the Group's Set-up box.


Deactivate an Event Group

Deactivate an Event group switches an Event group off. Once it’s been called, any conditions in your group will be totally ignored. You can return the events back to normal with an Activate an Event Group action.


Game Menu

These options let you change the workings of your game’s menu items. You can choose from one of four options:

Game Menu/Enable

Game Menu/Disable

Game Menu/Check

Game Menu/Uncheck

You can select the menu item to be affected when you’re entering these options from the Event Editor. A dialogue box will appear with a button marked “Click Here”. When you click, a menu will pop-up on the screen. Each title line will have it’s own entry.

You can read the user’s menu selections using the “Has an option been selected” condition.. You can change the menu’s entries with the “Edit Menu” option from the “Game setup” screen.


Enable

This enables an option from your game’s menu bar. You can enter the item to be enabled by clicking on the button, and choosing it from a pop-up menu.

See:

Disable


Disable

This  grays out an option from your game’s menu bar. You can enter the item to be affected by clicking on the button, and choosing it from a pop-up menu.

See: Enable


Check

This adds a “Tick” mark to an option from your game’s menu bar. You can enter the item to be checked by clicking on the button, and choosing it from a pop-up menu.

See:

Uncheck


Uncheck

This removes a “Tick” mark from a chosen option on your game’s menu bar. You can enter the item to be affected by clicking on the button, and selecting it from a pop-up menu.

See:

Check


Sound and Music Actions

Sound actions enable you to create impressive explosions, haunting theme songs, or interactive speech effects. In order to use Sound actions, you’ll need to have a “soundcard” installed on your computer.

The Games Factory allows you to generate two types of Sound Actions:

Samples are real sounds which have been digitally recorded on a computer. These files are stored with the extension ".WAV”. There are numerous examples of .WAV files on the Games Factory CD. You can also use “AIFF” samples recorded on an Apple Machintosh.

MIDI files play music using a series of pre-recorded instruments held in your computer’s memory.

You can play your sounds using the following actions:

Play sample

Play music

Play and loop sample

Play and loop music

Stop any sample playing

Stop any music playing


Samples

Sound samples are recorded digitally, just like a CD. The quality of these sounds depends on the amount of information you’ve recorded. A single second worth of sound could use one or one hundred kilobytes of space. Sound samples are great for things like speech, or explosions, but there’s rarely enough space to record long pieces of music.

You can play your samples using either the Play sample, or Play and loop sample actions.

There are several different types of Samples:

8 bit samples use the minimum amount of space, and can be played on even the most inexpensive soundcard.

16 bit samples are double the quality, but need double the memory. 16 bit samples will only play on special 16 bit soundcards.

Mono samples play a single sound through both speakers.

Stereo samples play a different sound through each speaker. Therefore, they require twice the storage space.

The Games Factory provides many sound samples for use in your games. Look in the Samples folder on the Games Factory CD.

If you want to create your own sound samples, you can record your effect directly from your soundcard using a microphone. Check the instructions that came with your soundcard for more details.

You can also manipulate the existing samples using a Wave Editor. These are widely available in both PD or Shareware form.

Note: If you are recording a sound sample yourself, you'll need to obey the rules of copyright. You're not allowed to take a sound from a TV or Video and distribute this as part of your game. It doesn't matter if you're giving your product away. You’ll still need to obtain the expressed written permission from the original developers.

When you add a sound action, you'll be asked to choose the sample using a file selector. You can Choose from three different types of files:

Wave file

To add a Wave file, select Wave file from the "Choose from" pull-down menu. You'll find a good selection of wave files on the Games Factory CD. Click the New Sample button to display the Windows Sound Recorder. You can use this to record your own sound sample using a microphone and mix and edit the sample for a professional result.. You can also use “AIFF” samples recorded on an Apple Machintosh.

Other Games

To add a file from another game, select Other Games from the "Choose from" pull-down menu. Pick a game file from the  selector. You'll see the.  available samples in the Sounds box. Click the sample you want use.

This game

To add a file from the current game, select This Game from the "Choose from" pull-down menu. You'll see the available samples in the Sounds box. Click the sample you want use.

You can test the sample at any time by clicking the Play button.

Note: Samples can be either "Normal”, or "Uninterruptable."

Normal samples will be replaced the moment you play a new sound. The instant you play something else, the old sound will stop.

Uninterruptable samples continue playing to the end of the sample, ignoring any new sound actions. You will be able to play a new sample when the current one ends.


Play Sample

The Play Sample action plays a sound sample through the speakers of your computer.

If you play another sample before the existing one finishes, the new sample will begin immediately. You can avoid this by enabling the Uninterruptable check box in the Choose a Sample dialog box.

You can test for the sample's completion using the Is a specific sample not Playing condition in the Event Editor.

Sample sound effects are ideal for the explosions in an arcade game, the narrative in a story, and the recorded speech in a presentation.


Play and loop sample

The Play and loop Sample action plays your sample a specified number of times. You can use it to generate an alarm, or simulate the ringing of a telephone.

Once you've chosen your sample, a dialog box will be displayed to enable you to enter the number of repeats.

Normally the loop will be stopped when you play another sample. You can avoid this by enabling the Uninterruptable check box in the Choose a Sample dialog box.

If you want to repeat a sample until the level ends, define a If specific sample is not playing condition, and assign a Play sample action to it in the Event Editor.


Stop any sample playing

Stop any sample Playing silences your speakers and stops any sampled sound effects.

You can use this action to clear the sound card before playing a piece of music, or to stop a looped sample at the appropriate point in your game.


Music

The Games Factory works with standard music files recorded in MIDI format. Each instrument is produced using single sound sample, and this sample is reused for the different notes. Music files are amazingly compact and will use much less space than the equivalent sound samples.

The latest soundcards come complete with a built-in set of Instruments. These General Midi cards cost a little more, but they’re worth having if you want to produce high quality music.

MIDI format is widely used by professionals, and the music is easily obtainable from software libraries or bulletin boards. You can create your own music using a MIDI compatible synthesizer or a commercial sequencer program.

Play your music using the following actions:

Play Music

Play and loop music

As with Samples, you can read your music from three sources:

Midi File

To add a Midi file, select Midi file from the "Choose from" pull-down menu. The Games Factory contains an excellent selection of Midi files on the CD. You should also look at the disks that came with your sound card. These disks usually contain some impressive examples to demonstrate the features of your card.

Other Games

To add a file from another game, select Other Games from the "Choose from" pull-down menu. This reads your music from a GF game. Each piece will be represented by a single entry in the Choose a music dialog box. You can listen to the music by clicking the Play button.

This Game

To add a file from this game, select This Game from the "Choose from" pull-down menu. This reads your music from a GF game. Each piece will be represented by a single entry in the Choose a music dialog box. You can listen to the music by clicking the Play button.

It is possible to play both a sound sample and a piece of music simultaneously. If you'd rather keep them separate, you should use a Stop Any Sample Playing action before you start your music.


Play Music

The Play Music action plays a pre-recorded MIDI music file through your speakers. Music can be very effective, especially in a presentation. A well chosen theme song can add a real sense of atmosphere to your game.

You can wait for your music to finish using an Is a specific Music not Playing test in the Event Editor.


Play and loop music

The Play and Loop music action repeats your music several times. You can use this action to add background music to your game or add a different theme to each level in an action game.

After you've chosen your music, you'll be asked to enter the number of times you want to repeat it. Type a value of 0 if you'd like to play the music for the duration of the current level.

The music will be turned off if you play another music file. The new tune will take over from the current note, and will stop when it reaches the end.


Stop any music playing

The Stop any music Playing action stops the music at the present note.

You can use this action to stop the music before playing a sound sample. You could also assign one of these actions to a keypress. This would allow your users to turn the music off by pressing a key.


Storyboard Controls

The Storyboard Controls are used to move between the levels in your game. Storyboards Controls enable you to switch to a new level, jump to a specific level, or restart your game from the beginning.

They are also the home of the powerful  Scrolling actions. These are perfect for platform games, because they let you shift to a new part of the screen when the player moves out of view.

The Storyboard Control actions are:

Next level

Previous level

Jump to level

Restart the current level

Restart the Game

End the Game

Quit the game

Scrolling


Moving between Storyboard Levels

Levels divide your games into sections. Each level can contain either a multimedia effect, a still picture, an FLI, or an entire game. Use the Create a Level icon in the Storyboard Editor to add levels to your games.

You can dissolve between your levels using a range of predefined Fade effects. These effects will be called automatically when you change levels so you can set them up, and forget about them. If you're feeling adventurous, you can create your own fade effects using Fade mode in the Level Editor.

Normally, your levels will be completely independent, and have their own unique set of objects and events. Whenever you leave a level, the contents of any Local Counters and Alterable Values will be lost. The values of Lives, Scores, or Global Objects will be preserved.

If you want to keep an object between levels, or use the same events for the duration of your game, you should enable the Global box in the Preferences or Set-up dialog screen.


Next level

The Next level action jumps forward to the next level in your Storyboard.


Previous level

The Previous level action moves backwards to the previous level in the Storyboard.


Jump to level

The Jump to level action moves to the specified game level. If your new level contains a Fade In effect, it will be called up automatically.


Restart the current level

Restart the current level reruns the current level from the beginning.


Restart the Game

Restart the Game restarts the game from the first level in the current Storyboard.


End the Game

End the Game quits the game and closes the window on the desktop.


Scrolling Actions

The Scrolling actions are used for platform games and banners. They gradually move your game window over a larger playing area.

You can use Scrolling actions to generate a variety of attractive effects. You can create extra long messages for banners, and shift them sideways through the game window. Great for a presentation! You can create detailed maps or playing areas which are larger than the actual screen. Perfect for war games, and sports simulations! You can display large text areas, and gradually reveal them during your game. These would be ideal for interactive books or Encyclopedias!

Before using these actions, you’ll need to make the playfield larger than the display window. Change the window and playfield size using options from the General Preferences or Level Preferences dialog box.

Here are a few tips:

1)	Keep the display window as small as possible. 320x200 is ideal.

2)	If you’re using a size of 320x200, you can speed things up using the 320x200 full screen at start option from the Game Setup dialog box. This puts your screen into a super-fast VGA mode, and dramatically improves the performance.

3)	Build your screens out of a series of reusable "tiles". Each tile can be defined using its own backdrop, or Quick backdrop object. These objects are only stored once, no matter how many times you use them on the screen. They're ideal for displaying standard parts, like bricks, buttons, floor tiles, letters, or road sections. You can use tiles to generate massive areas out of just a small number of sections, saving you lots of memory.


Center Windows position in playfield

The Center Windows position in Playfield action shifts the display window to a new part of the playfield.

The Display Window can be controlled just like a standard game object, with the hot-spot at the center. As you change the position, the window will move over the play area, revealing new objects and challenges for the user.

You can use this action to move your window in any direction. Choose the new coordinates, and jump to a different part of the playing area.

There are lots of possible uses for this action. In a presentation or screen saver, you could create your own fancy control panels for your users commands. Hide the control panels and then flash them into place just when you need them. In an arcade game, you could scroll the screen during the level, so that the background appears to shift under the player's ball. In a platform game, you could scroll the background as the characters moved, so you'd see their surroundings as they walked to a new location.

When you’re entering a scrolling action, you’ll be asked to choose the Window position from a dialog box. By default, the window will be placed at coordinates 320,240. This will center the window neatly on your display.

The new coordinates can be either fixed (from the top left of the Playfield), or relative to a particular game object. If you attempt to move the window outside the play field you will end up with a blank screen.


Center Horizontal position of Window in playfield

The Center Horizontal position of Window in playfield action shifts the display window left or right through the playing area. It’s used to move a banner or platform sideways through your display window.

You can enter the position from a selector. As with “Center Window position..” you'll get an empty window if you attempt to move outside the playfield.

If you've created an extra wide playfield, you can use this feature to create attractive horizontal scrolling effects. These would be perfect for arcade or platform games. They can also be used to scroll a long banner across your window.


Center Vertical position of Window in playfield

The Center Vertical position of Window in playfield action moves your display window up or down through your play area. It’s used to slide the background areas in arcade games and scroll the text in an interactive book. The window is treated like an active object with its hot-spot at the center.

You can move the window around the playfield by entering a new coordinate for the center position. You’ll be asked to choose this value when you’re defining the condition. All coordinates are measured downwards from the top of the playing area.


How scrolling works

Whenever you run your games, they will be displayed in their own window on the Desktop.

Normally, that’s fine. But what do you do if the play area is actually larger than the window? In this case, you'll only be able to see a small piece of your level at a time.

We’ve therefore provided a simple way of moving the display window through the playfield. These Scrolling actions drag the window by its center, and change the region which will be displayed on the desktop.

You can set the window position using a set of X and Y coordinates.

Whenever you move this window, the contents will be immediately replaced with the new part of the playfield.

You can read the current window position directly from your game using the following functions:

Width

Height

X coordinate of left visible edge

X coordinate of right visible edge

Y coordinate of bottom visible edge

Y coordinate of top visible edge

There are three different versions of this action to choose from. Each has its own particular set of games.:

Center Window Position in Playfield

This takes your new coordinates and moves the window over any section of the play area. You can use it to scroll through a map in any direction.

To use Center Window Position in Playfield, create two Counter Objects and load them with the initial center coordinates of the display. Use the Icon Editor to change the names to something sensible like X and Y.

You can now move the display as follows. To move your display up, subtract an appropriate value from the Y Counter. To move it down, add a value to the Y Counter. Similarly, you can increase the X Counter to move the display right, and reduce it to move it left.

Once you’ve altered your Counters, call a scrolling action and read the coordinates into the coordinate boxes.

You can read the Counter values from the Expression Evaluator. Click the Edit button to display the Expression Evaluator and click the Retrieve Data from an object button. A dialog box will open showing a list of your objects. Click the X and Y Counters to use their contents for your game

Center horizontal position in playfield restricts your window to left or right movements. It’s mainly used for banners and platform games.

You can scroll the display window left by reducing the coordinates. You can move it to the right by increasing them.

Center vertical position in playfield is limited to up and down movements. You can use it to create extra tall message windows, and vertical scrolling arcade games.

Increasing the coordinates will move the display down. Reducing them will scroll it up.


Create New object Actions

The Create New object Actions lets you create new objects as your game runs. These actions can be used to generate shooting stars, fancy explosions, or to introduce new aliens during a game. If you’re into simulations, you can also generate artificial life-forms which grow and reproduce in a realistic way.

Note: If you want to fire a missile, it’s easier to use Shoot an object from the Object's action menu. This is faster to set-up, and it's equally effective.

First, we’ll need to go into a bit of theory. Any active object can have a number of child objects. These can be placed either at a fixed screen coordinate, or relative to the parent object which created it.

You can edit these objects in the Level Editor, and assign them to any of the available movement options. An explosion can be made to streak away into the distance.

If an object has any child objects, you’ll see an arrow icon [image] when you select it in the Level Editor.

You can display these objects by choosing the Show Children option from the pop-up menu. The objects will now appear on the screen. You can move them around and assign them to a movement option just like any other object. They’ll be marked with an arrow [image] symbol to show that they will be created during your game.

When you’ve finished, you can return to the parent object by clicking the child with the right mouse button and selecting Hide.


Creating your Objects

Creating an object is simple. In the Event Editor, click a Grid box, under the Create New object icon, with the right mouse button. Choose Create Object from the pop-up menu. Select an object from the object selector. Click OK. Choose the position of the object on the play field.


Choosing an Object

Creating an object is simple. In the Event Editor, click a Grid box, under the Create New object icon, with the right mouse button. Choose Create Object from the pop-up menu. Select an object from the object selector.

If you don’t see the object you want, you can pick one from either a library, or GF game.


This level

This level is the default setting. This level enables you to choose an object from the current game. You can move between the levels in your game using the < or > buttons.


Other games

Click Other Games to use an object from another GF game. You'll be asked to choose a new game from a standard file selector.


A Library

You can choose an object library from the A Library pull down menu. Once you have chosen a library, the available objects will be displayed in the window.

Once you've chosen your object, you'll need to position it on the screen. Click OK to enter the starting point.

There are two ways to enter the location of the object:

At actual coordinates

The simplest method is to read the location from a fixed screen position. Type the new coordinates into the X and Y boxes or position the object by dragging a "cross-hair" ( [image]) with the mouse.

Relative to

The Relative To button places the new object near an existing one. The coordinates can be taken from any object on the playfield. You’ll be asked to choose the object from a selector. You’ll now get a screen full of options so that you can set the location.

Here’s a quick summary.

The coordinates can start from the source objects Hot Spot or Action point.

You can place you object from a User defined point or In the direction of the source.

The object’s orientation can be either Normal or In the same direction as the source


Player Actions

The Player Actions are perfect for use in games. You can use Player Actions to change the score, add or deduct lives, or override the Player Controlled Movement system.

By default, you can only enter an action for Player 1. If you want to use more players, you'll need to define each player in the Level Editor.

To add more players

1)	Create an Active Object for each player in the Level Editor.

2)	Click the Active object with the right mouse button and choose Movement, Select Movement from the pop-up menu. Assign each Active Object to a Player controlled movement option such as Platform or Eight-Direction.

3)	Assign the settings for the particular movement options. Click OK to accept these settings.

4)	Click the Active Object with the right mouse button and choose Movement, Moved by from the pop-up menu. Assign an Active object to each of the players. The available Player numbers range from 1 to 4.

When you return to the Event Editor, you'll see a new icon for each additional player.

Here’s a list of the available Player actions:

Change Score/Set Score

Change Score/Add to Score

Change Score/Subtract from Score

Change Lives/Set number of Lives

Change Lives/Add to number of Lives

Change Lives/Subtract from number of Lives.

Affect Input/Ignore control

Affect Input/Restore control


Change Score

Change Score actions are used to change a player’s Score. If you’ve assigned a Score Object to this player, you’ll see the result immediately on the screen.

You'd use a Change Score action after a successful hit on an alien, or to add in your level bonuses. You can read the Score can be taken from either an expression or another object. You could increase the score by a different amount depending on the speed, animation, or value of the victim.

In both cases, click the Edit button to display the Expression Evaluator and click the Retrieve Data from an Object button to choose your value from a dialog box.

There are three possible actions:

Set Score

Add to Score

Subtract from Score

You can test the Score from your game using a Compare to player’s Score condition or a Current value of Score function.


Set Score

Set Score sets the score to a new value. Generally, the score starts at zero, so there’s no need to set it directly. However, you can set the initial number to anything you wish. You can also allot the maximum points at the beginning, and reduce the score when the player makes a mistake.


Add to Score

Add to Score increases the score by the specified amount. If you’ve previously assigned the player to a score object, the score will appear on the screen automatically.

You can use this action when the player does something clever such as destroying an alien or moving to the next level.

We’d advise to be a bit stingy when you’re handing out rewards. If you make things too easy, people will tend to feel cheated. The best games are hard, but fair. That’s what makes them so challenging!


Subtract from Score

Subtract from Score reduces the score by a specific value. If you’ve set up a score object for the player, the updated score will be displayed on the screen automatically.

You can use this action to add penalties when a player makes a mistake, or loses a life.

You can also create games where the aim is to get the lowest score possible. In this case, you’d start the players with a large score, and reduce the score as a reward.


Change Lives

Change Lives actions change the number of lives a player has.

You’ll need assign to your player to a Lives object in the Level Editor to see the effect of a Change Lives action. The Lives Object will automatically display the number of lives as either a counter, and animation, or a series of appropriate images.

You can test the lives using the following conditions in the Event Editor:

Compare to player’s number of lives

When number of lives reaches zero

You can also read the lives directly from your game using the Current Number of Lives function. If the number of lives drop to zero, the player can be killed using an appropriate End the game action.

There are three Change Lives actions to choose from:

Set number of Lives

Add to number of Lives

Subtract from number of Lives.


Set number of Lives

Set number of Lives enters a new value for the number of lives a player has. You’ll only see the effect if you’ve assigned a Lives object to the player.

Normally, the player will begin a game with three lives. If you want you make things a little easier, or you have a really hard game, you might increase the number of lives.


Add to number of Lives

Add to number of Lives increases the number of lives assigned to a player. If you’ve assigned a Lives object of this player, you’ll see the effect immediately on the screen.

You can call this action as a bonus after the player successfully completes a game level, or to prepare the player for a particularly difficult section.

Don’t be too generous!. If you give the player too many lives, the game can become very simple. You should also remember that each extra life will take up vital space on the screen. A display that looks great when the player has three lives can look awful when the player has ten.


Subtract from number of Lives

Subtract from number of Lives reduces the number of lives by the chosen number. If you’ve set-up a Lives Object, you’ll see the effect straight away.

It’s worth thinking carefully before you Subtract from number of Lives. You don’t want to make your games too easy, but there’s a fine line between a challenging game and an impossible one.


Player Control

The Player Control menu provides you with two actions that turn the player's controls on or off. These actions are used for objects that have been assigned to a player with using a Platform, Eight Direction, Race-car, or Mouse movement.

There are two possible actions:

Ignore control

Restore control


Ignore control

Ignore control tells your game to ignore any commands entered from a Platform, Eight Direction, Race-car, or Mouse movement.

You can now move this object directly in your game, generating skids, swerves, or end of level animations.

Here’s a trick if you want to move your object along a predetermined path.

Create another object in the Level Editor and assign it to your chosen movement path. Place this object outside the playing area so that it won’t interfere with the rest of your game.

You can use this object as a template for your Player’s movements. Hide the template object with a Make object Invisible action, and position it underneath your player’s object using a Select Position action.

You can then start the template object moving along the path. Turn off the controls, and call an Every condition to place your player's object under the invisible object. You can read the coordinates using the X coordinate and Y coordinate functions in the Expression Evaluator. The player will now follow the selected path, just as if you’d assigned it directly in the Level Editor.

After the movement has been completed, move the template back outside the playing area, and restore control to the player.


Restore control

Restore control returns control to the player after an Ignore control action.

The player can now use the mouse, keyboard, or joystick to move the object around on the screen.


Mouse and Keyboard Actions

Mouse Pointer and Keyboard Actions provide you with the following options:

Hide mouse makes the mouse pointer invisible

Show mouse makes it appear again.

.

The visibility of the pointer has NO effect on the operation of the mouse. You can still move the mouse, and test its position with the XMouse and YMouse functions.

See:

XMouse

YMouse


Hide mouse

Hide mouse removes the mouse pointer from the screen. You can return it again using the Show mouse action.

Note: The visibility of the pointer has NO effect on the operation of the mouse. You can still move the mouse, and test its position with the XMouse and YMouse functions. You just won’t be able to see it on the screen.


Show mouse

Show mouse makes the mouse pointer visible after you’ve removed it using a Hide mouse action.


Active Object Actions

Each Active Object will have its own icon in the Event Editor. You can use this icon to change the speed, direction, animation, or values of the object.

There are dozens of Active Object Actions:

Movement

Stop

Start

Set Speed

Set Maximum Speed

Wrap Around Play area

Bounce backwards

Reverse

Animation

Stop

Start

Change

Restore

Paste Image into background

Bring to front

Bring to Back

Position

Select Position

Swap position with another object

Set X coordinate

Set Y coordinate

Direction

Select direction

Look in direction of

Visibility

Make object invisible

Make object visible

Flash object

Shoot an object

Destroy

Values

Set Value

Add to Value

Subtract from Value

Spread a value

Flags

Set Flag On

Set Flag Off

Toggle


Movement Actions

Movement Actions change a previously defined movement setting.

The available Movement Actions are:

Stop

Start

Set Speed

Set Maximum Speed

Wrap Around Play area

Bounce backwards

Reverse

Some of these actions can only be used by certain movement systems:

Mouse movements

If you’ve assigned your object to the mouse, you can only use the Start or Stop actions.

Bouncing ball movements

Ball Objects can use Start, Stop, Set Speed, and Bounce.

Path movements

If you’re moving your object along a predetermined path, you can use the Start, Stop, Wrap around play area, and Reverse actions.

Platform movements

If you’re walking a character along a platform you can use the Start, Stop, Set Speed, Set maximum speed, Wrap around play area, and Bounce commands.

.

Race-car movement

Race-car Objects can be controlled using Start, Stop, Set Speed, Set maximum speed, Wrap around play area, and Bounce.

8 Direction movement

8 Direction objects can use the Start, Stop, Set Speed, Set maximum speed, Wrap around play area, and Bounce actions.

Static

Static Objects remain in their original position for the duration of your game. You won't be able to use these options at all.


Stop

The Stop action stops an object from moving. It’s used to block a movement in a selected direction, or stop your object from leaving the play area.

You can test the position of your object using the following conditions:

Test position

Compare X position to a value

Compare Y position to a value

If you’ve assigned your object to a player, you can restart the object by choosing an alternate direction.

If the object is controlled by the computer, you can trigger movement again using a Start action.


Start

The Start action starts an object moving after it’s been blocked with a Stop action. The speed and direction will be the restored to the previous settings so your object will move off in its original direction.

You can test whether an object is still moving with a Has ‘object’ stopped condition.


Set Speed

The Set Speed action changes the speed of your object.

You can use this action to speed up the aliens during an arcade game, simulate the gas pedal or accelerator on a car, or simulate gravity.

Enter the speed using a slider. Moving the slider to the right will increase the speed and dragging it to the left will decrease the speed.

You can test the movement of your object with the speed, acceleration, and deceleration functions from the Expression Evaluator.


Set maximum speed

The Set maximum speed action sets a speed limit for your object on the screen.

This action can be used to simulate the gears of a racing car. Each gear could have a different maximum speed setting. You can also use this action in simulations or platform games to limit the speed that your object will fall.

You can test the movement of your object with the speed, acceleration, and deceleration functions from the Expression Evaluator.


Wrap around play area

The Wrap around play area action is normally used when your object leaves the play area. It takes your object, and repositions it on the opposite side of the display.

You can test the object’s position using the following conditions in the Event Editor.

Test position

Compare X position to a value

Compare Y position to a value

You could use this action to scroll some stars across your screen, or bring your aliens back into play when they disappear off the edges of the display window.


Bounce

The Bounce action bounces an object across the screen.

You can use this action in rebound games and pinball simulations to bounce an object off an obstacle. You can also bounce messages around the display for use in your screen savers.

You can read your object’s location using three simple conditions:

Test position

Compare X position to a value

Compare Y position to a value

You can test for collisions with:

Collision with an Active object

Overlapping another object

Collision with backdrop

Test whether the rebound has completed with an Is ‘object’ bouncing condition.


Reverse

The Reverse action is only used by “Path” Objects. It stops the movement at the current position, and starts the object back in the opposite direction.

You can test the object’s position in the path using the following conditions:

Has “object” reached a node in its path

Has “object” reached the end of its path

You could use this action in an arcade game to sweep the aliens back through their movement pattern after an attack, or in a presentation to move a banner across the screen.


Animation Actions

Animation Actions allow you to change the animation effects for an object.

Any Active Object can be assigned to up to sixteen different animation sequences. Each of these sequences can be shown in up to thirty-two orientations. You can easily create different animations for the different phases of your game.

An animated banner could appear in different sizes as it moved away from the screen. An arcade game might have one animation for your object moving, another when it stopped, and a third when it was being destroyed. You can choose between the animation sequences using the following commands:

Stop

Start

Change

Restore

Paste Image into background

Bring to front

Bring to Back


Stop

The Stop action stops the animation at the current frame. You can use this action to stop a character from walking when it hits a wall, or freeze an object temporarily. You can restore the animation to its previous settings using a Start action.


Start

The Start action restarts your animation after it has been halted using a Stop action. The animation will continue from the current frame and the speed will be restored to its previous value.


Change

The Change menu gives you control over your object’s animation settings. You can use it to change the animation type, choose the animation direction, and adjust the speed. The available options are:

Animation sequence

Direction of animation

Speed of animation


Animation sequence

The Animation Sequence action changes the animation sequence that is being displayed by your Active Object.

Each object can have up to sixteen different animation sequences and you can switch between these animations at any time in your game.

Here’s how this might work:

In a product demonstration, you could create a different set of animated messages for a range of languages. You could now let the users choose the appropriate language using a control panel or Question object.

In a graphic adventure, you could draw your characters in several sizes depending on their distance from the screen. You could then change the animation sequence to make the characters walk into the distance.

When you enter one of these actions you'll be presented with full a list of the currently defined animation types. Each type is represented by a name, such as “Stopped” or “Walking”. Despite their names, most animation types can be used for anything you like. The only exceptions are “Appearing” which will be called when an object is created, and “Disappearing” which will be shown when an object is destroyed.

The other types are general purpose, and you can create them freely from the Animation Editor. The last four animation types are “User Defined”. These can be renamed in the Animation Editor for your own use.

After you’ve created your Animation types, you can switch between using the Change Animation action. You’ll be asked to choose the new type when you are entering the action. You can make your selection by clicking a name.

You can also enter the animation type as a number or expression.

The [image] button displays a dialog box and allows you type in a number, or click the Edit button to display the Expression Evaluator. The types are numbered from 0 (Stopped) to 15 (User Animation 4).

Note: Once you’ve entered one of these numbers, any attempt to edit the type will display the expression. If you want to replace this number with the name of a type, you’ll need to delete this action and start again.


Direction of animation

Any animation sequence can be displayed in up to thirty-two different directions. You can draw these directions separately, or create them using the Rotate icon in the Animation Editor.

Normally, The Games Factory will choose the direction automatically The object will change direction whenever you turn an object in your game. The Direction of Animation action lets you override this setting and choose the direction yourself.

You’ll be asked to pick the direction using a dialog box that is arranged like the face of a clock. Click the dots around the edge to select a direction. An arrow will appear showing your new heading. If you select several directions, the direction will be chosen at random by the system.

At the bottom of this box, you’ll find three small control icons.

 selects ALL the available directions.

 clears the current directions and lets you choose some new ones.

 lets you enter a direction number. The directions are numbered counterclockwise starting from 0 (3 o’clock) to 31. If you want to change the direction using a calculation, click the Edit button to display the Expression Evaluator.

You can read the existing direction by clicking the Retrieve data from an object button and choosing your object. The function you need is the Current Direction option.


Speed of animation

The Speed of animation action sets the animation speed. The larger you make the value, the faster your images will be displayed on the screen.

Use this action to adjust the animation rate as an object accelerates, make a character's legs move faster when it starts to run, or speed up the movement of your aliens as a level progresses.


Restore

The Restore action returns you to the previously selected animation effect. Whenever you change the speed, or animation type, The Games Factory will save the original values in memory. You can restore the original settings if required.

Restore lets you make brief changes to your animations, and jump back to your old settings when you’ve finished.

There are three actions:

Animation Sequence

Direction of animation

Speed of animation


Animation sequence

Animation sequence selects the most recently displayed animation type in your game. You could use it to display a different animation when your object fires a missile. After the launch, you could then call a Restore Animation Sequence action to return the ship back to normal.


Direction of animation

The Direction of animation action switches to the previously chosen animation direction. During a combat sequence, you can temporally turn a character to face the player. If the character survives, it can be turned to its original heading, and continue on its way.


Speed of animation

The Speed of animation action returns an object to the previous animation speed. You could use this action to reduce an object’s speed after a sudden burst of movement, or create slow motion replays of important events.


Bring to front

The Bring to front action moves your object to the front of the playfield. Normally, Active Objects are displayed in the same order they were created. Whenever you add a new object to your game, it will appear to be on top of all the other objects.

You can change the order in the Level Editor using the View option from the objects menu. However, it is often more convenient to adjust the order during your game.

The Games Factory provides you with two actions.

Bring to front moves the object to the foreground.

Bring to back moves the object to the background.

You can use these actions to move an object forward and backward. This lets you simulate a perspective effect, and its great for controlling the characters in a graphic adventure.


Bring to back

Bring to back moves your object to the back of the playfield. It will now appear to be behind all the other objects in your game.


Paste image into background

Paste image into background uses your object as a paintbrush. It pastes a copy of your object's image at the current coordinates. The new image is treated like a backdrop, and can be setup as a ladder, platform, or an obstacle. The original object is unaffected.

There are lots of games for this action. In a platform game, you could add new ladders and obstacles during a game. It makes an exact copy of your current animation frame, and plots it on the screen. You can use it to add new obstacles or walls during a game, or create drawing games with animated brushes.

When you select this action, a dialog box with the following options will be displayed:

No effect on collisions.

The new picture will be pasted in the background, and completely ignored by the rest of the system.

Not an obstacle

This makes your picture into a background object which has not been assigned as an obstacle.

Obstacle

This creates a background obstacle. You can test whether an object has hit one of these obstacles using a Collision with backdrop condition.

Platform

This creates a floor which a platform object can move over. This is great for producing walkways and stepping stones.

Ladder

This creates a ladder which can be climbed by a platform object. You can use this to change the layout of a platform game as it is being run.


Position Actions

The Position actions move your objects around the play area. You can change the position using the following actions:

Select Position

Swap position with another object

Set X coordinate

Set Y coordinate

With a little imagination, you can easily create your own movement systems for platforms, pinballs, or missiles.

To create your own movement system, in the Level Editor, define each object to Bouncing Ball movement.  Bouncing Balls movement is perfect for generating your own movement system because you can stop the object from moving. By disabling the Moving at Start check box., you can move the object using your own commands.

You can move your objects using either the Select Position, Set X coordinate, or Set Y coordinate actions.

The best way to trigger these actions is to use an Every condition in the Event Editor. This condition performs your actions at regular intervals. Enter the delay between each movement in units of hundredths of a second. The smaller the value, the faster the object will move across the screen.

If you’re using Select X coordinate, or Select Y coordinate, you’ll need to keep track of the object’s existing coordinates. This can be achieved using the X and Y functions from the Expression Evaluator. You can read these functions by clicking the Edit button, and calling the Retrieve data from an object feature. Click the object with the right mouse button, and pick the appropriate option from the Position menu.

The X coordinate changes the horizontal location. You should increase it to move your object right, and reduce it to move left.

The Y coordinate affects the vertical position. It should be increased to move your object down, and reduced to move your object up.


Select position

Select position moves your object to a new location on the play area. You can enter this location as either a fixed screen coordinate, or take the coordinates directly from an existing object.

There are three main uses.

Moving an object to a specific screen location

Enter a value into the X and Y boxes, or drag the "cross-hair" to a new position to enter the coordinates. As you move the cross-hairs, the coordinates will be updated in the X and Y boxes. Click OK to assign the coordinates to your current action.

Moving an object in a selected direction

Enable the Relative To button and pick your current object from the selector. Enter a value into the X and Y boxes, or drag the "cross-hair" to a new position to enter the coordinates. As you move the cross-hairs, the coordinates will be updated in the X and Y boxes. Click OK to assign the coordinates to your current action.

Moving an object towards a target

You can use this action to link the movements of several objects. Enter a value into the X and Y boxes, or drag the "cross-hair" to a new position to enter the coordinates. As you move the cross-hairs, the coordinates will be updated in the X and Y boxes. Click OK to assign the coordinates to your current action.

If you enable the At Actual X, Y Coordinates button, the coordinates will be measured from the top left coordinate of the player area. If you enable the Relative to Object option, the coordinates will be measured from the Hot-Spot or Action Point of the chosen object.


At actual coordinates

The At Actual coordinates action moves your object to a fixed position on the screen.

You can enter the position by dragging the cross-hairs to enter the new coordinates. As you move the cross-hairs, the coordinates will be updated in the X and Y boxes. You can also type in new values for the X and Y boxes. Click OK to apply the settings.


Relative to object

Relative to object reads the coordinates from a selected target object. This option is often used for creating guided missiles.

After you’ve enabled this button, you’ll be asked to choose an object from a selector. This can be any object from your current level including the object you are moving. If you choose the same object, it will be moved the chosen distance from it’s current location.

Click the Options button to set up the direction and location of your new object relative to the target. There are several possibilities:

Originating from hot spot

This measures the object’s coordinates from the target’s hot-spot.

Action point

This bases the coordinates from the target's action point.

Located

The located options change the way your object will be positioned.

User defined point

If you enable the User Defined Point, you’ll be able to enters the location using the mouse. A line will be stretched from the cross-hairs to your selected target.

In direction of

This option places the object in a different position depending on the target's direction. You could use this option to place a cloud of smoke behind a car, or create a missile in front of a ship. The position of your object would be automatically adjusted as the source turned.

Orientation

These options change the direction of your object your object will be facing.

Normal

By default, your object will remain at its original heading.

In direction of

If you enable In direction of, your object will be turned towards the target object.


Swap position with another object

Swap position with another object swaps two versions of your object on the screen. The currently selected object is swapped with another version or clone chosen at random.

You could use this option to shuffle the cards in a deck.


Set X coordinate

Set X coordinate moves your object left or right. Type the coordinate value directly from the keyboard or take the location from another object.

You can also set the vertical position with Set Y coordinate.

If you’ve assigned your object to a Bouncing Ball movement, you can use an Every event to call this action at regular intervals. This enables you to move your object using your own control systems.

Click the Edit button to display the GF Expression Evaluator. Use the Expression Evaluator to enter functions.

Here are a couple of ideas. Use a Random(640) function to generate a random position for your object. Use the X function to read the coordinates from any object in your game, including the current one.

Supposing you had an object called “arrow”. You could move it to the left with an expression like:

X(“arrow”)-1

You could move it to the right with:

X(“arrow”)+1

You could also use the location from another object using the same system. You could use this movement system in a platform game to move the enemies towards the main character, or load the X coordinate from a Path object to "borrow" its movement pattern.


Set Y coordinate

Set Y coordinate moves your object up or down. Type the new coordinate directly from the keyboard or take the location from another object.

You can set the horizontal position of your object using the Set X coordinate action.

You can use these actions with a Ball movement to control your objects directly from your game. You could now trigger your actions at regular using an Every event

Set Y coordinate can be used with a variety of GF functions. Use a Random(480) function to generate a random position for your object. Use the Y function to read the coordinates from either the current object, or another one.

Supposing you had an object called “missile”. You could move it up with an expression like:

Y(“missile”)-1

You could move it down with:

Y(“missile”)+1

These functions provide an easy way to simulate gravity. Change the object's Y coordinate to the existing value plus a small amount. The object will now "fall" down from the current position.

You can also to copy the Y coordinate from another object. This would enable you to place your object on a moving platform such as an elevator.


Direction Actions

The Direction actions turn your object to a new heading. The headings are numbered counterclockwise starting at zero.

There are two direction actions to choose from:

Select Direction

Look in Direction of


Select direction

The Select direction action turns your object to face a new direction. You could use this action to control the character in a graphic adventure. If the player pulled the joystick in a specific direction, you could turn the character around.

You can choose the directions using a dialog box. Select as many directions as you like. If there are several, The Games Factory will pick a direction at random from your list.

 selects all the available directions.

 clears the direction window completely.

 enters the direction number from the screen.


Look in direction of

The Look in direction of action turns your object so that it's pointing towards a selected "target". This action provides you with an easy way of generating a guided missile.

To create a guided missile, create an Active Object in the Level Editor.

1)	Click the object with the right mouse button and choose Movement, Select Movement from the pop-up menu.

2)	Click Bouncing Ball Movement. Use the Ball Movement Setup dialog box to change the settings. Click OK to assign your movement settings.

3)	In the Event Editor, click the New condition box with the right mouse button. Click the Timer icon and choose Every from the pop-up menu. Set the delay to repeat your actions several times a second.

4)	Click the grid box under your Active Object. Select Direction, Look in the Direction of from the pop-up menu. Enable the Relative to check box and select the target from the dialog box. Click OK. Your missile would now home in on the target's current position


Visibility Actions

Visibility actions hide an object temporarily in the background. These actions can be used to display the contents of a safe in an adventure, or generate the hidden locations in a platform game. There are three Visibility actions:

Make object invisible

Make object reappear

Flash object


Make object invisible

Make object invisible stops your object from being displayed on the play area. The object will remain active, but it will not collide with any other objects in your game.

Invisible objects can be surprisingly useful. You can assign movement patterns to them, and use their positions for use with your other objects.

Supposing you wanted to move an alien through several different paths depending on the situation. You'd create a different object for each path, and assign it to the required movement. These objects could be positioned safely off-screen and made invisible.

When you needed a particular pattern, you'd place the object under your alien, and set the concealed object in motion using a Start action from the Movement menu. Since the object would be hidden, it would have no effect on your game. But you could read its position at regular intervals to move your alien along the same path.


Make object reappear

Make object reappear redraws a hidden object at its current position.


Flash object

The Flash object action repeatedly flashes an object on and off the screen.

You can stop this effect by calling either a Make object invisible, or Make object reappear action as appropriate.


Shoot an object Actions

Shoot an object actions fire a new object from an attacker. These actions are used for the missiles or bullets.

When this actin is selected, you'll be asked to choose the object to be fired, and enter its speed and direction. The object will be created automatically when it's needed.

Speed sets the speed of your missile. Move the slider to the right to speed things up and drag it to the left to slow things down.

Direction of object selects the direction of a bullet.

Use direction of "object " lines the bullet up with the source object, and fires it in the same direction. You'd use this for a simple missile. The firing direction would change when your object turned.

Shoot in selected directions shoots your missile in a different direction to the source. You can enter the new course from a dialog box. If you choose several directions, The Games Factory will pick one at random.


Shoot in direction of

Shoot in direction of... aims the bullet at the selected object. You would use this action to fire a missile towards a spaceship or the coordinates of the mouse pointer.

Note: The Games Factory uses the following terms. The new object is called a "child object”. The object which created it is known as the "parent object".

After you've set up a Shoot in the Direction of.. action, your new object will be added to the Event icons for future use. It can also be changed in the Level Editor.

A downward pointing arrow ( [image]) will be shown under the parent object. You can edit the child object by clicking the “parent” with the right mouse button, and selecting Show children from the pop-up menu. If there are several children, you'll be able to choose which child to edit from a list.

Your child object will now be displayed on the screen and can be edited. You can move it around the play area, assign it to a new movement pattern, or change its animation sequence.

An upward pointing arrow ( [image]) will be displayed to indicate that the object was created during the current level. You can return to the parent by selecting the object from the Level Editor and choosing the Hide option from the menu.


Destroy Action

The Destroy action removes an object from the screen and turns off any actions or events which use it. If you've assigned an a "Disappear" animation, this animation will be played before the object is removed.

Destroy only affects a single object at a time. If you've created several different clones of an object, you can destroy off each version individually.

Use the Destroy action to destroying an alien in an arcade game, kill a character in a platform game, remove a brick in a rebound game, or erase a banner in a presentation.

Note: If your objects are local, they will be destroyed automatically at the end of the current level. Global objects will remain available throughout your game.

See:

Create new Objects


Values Actions

Active Objects are continually changing. They dance across the screen in chosen patterns, altering their position, speed, and direction. You can test these values at any time using a range of functions in the Expression Evaluator.

The functions provide general information about your objects. Other information will vary depending on the type of your game.

In a game, you might want to store the number of an object's missiles, the strength of a character, or the value of a card. In a simulation, you could record the age of a cell and the number of current offspring. In a presentation, you could generate different banners depending on the user's language.

You might define a series of Counter Objects to hold this data. However, you will require a separate set of Counters for each object in your game. We've therefore, provided you with a neat alternative. Each active object can be assigned up to three Alterable Values, labeled A, B, and C. These can hold whole numbers ranging from -2000,000,000 to +2000,000,000. These values can't store fractions such as 1/5 or 3.14.

If you've cloned your object, each version can have a different set of values. Alterable Values can be tested using the Expression Evaluator, and included in your calculations. They can be changed using the following actions:

Set Value replaces the value with something completely new.

Add to Value adds a number to the current contents.

Subtract from Value takes a number from the selected value.

Spread a number loads each version of an object with a different number.

Choose the operation using a dialog box. The radio buttons at the top of the dialog box, are used to choose a single value to be changed. The buttons below it select the type of the operation.

You can test the contents of these values using the Compare to Alterable Values conditions. You can read them into an expression with the Retrieve Alterable Value functions.

See:

Fixed Values

Flags

The Expression Evaluator

Values, functions, and Expressions

Set Value

Add to Value

Subtract from value

Spread a number


Set Value

The Set Value action replaces your current value with a new one. Type the new value directly into the box, or click the Edit button to display the Expression Evaluator and perform more complex calculations.

From the Expression Evaluator, click the Retrieve Data from Object button to enter the value from a function. The available functions let you test the speed, direction, or movement of any object on the screen. They can also generate random numbers for things like card games.


Add to Value

This Add to Value action gives you a fast way of adding a number to your Alterable Value. Type the new value directly into the box, or click the Edit button to display the Expression Evaluator and perform more complex calculations.

Add to value is useful for keeping count of an object's progress. In a simulation, for example, you could increase an object's "age" by one at regular intervals.


Subtract from Value

The Subtract from Value action subtracts a number from your Alterable Value. You can use this action to gradually reduce an object's attributes as a game progresses.

In a Role Playing game, you could reduce a character's strength after a successful attack. In an Arcade game, you could decrease the number of available missiles after one had been fired.


Spread a number

Spread a number is used for collections of objects or clones. Each object can be "cloned" several times in your game. These clones share the same appearance and movement system, but have a different position, and a different set of Alterable Values.

Sometimes, you might want to set each of these values to a different number. In a card game, for instance, you could assign each card to an identification number from 0 to 51. With a little mathematics, you could use this number to derive the value and suit of each card.

However, you'll need to be able to generate all of the identification numbers. The Spread a number action sets your objects in descending order. It begins with the first object of the current type, and loads this object with the total number of versions minus one.

So, if you had ten clones, the original would have a value of (10-1) or 9. It then takes your clones in the exact order you created them, and gradually reduces the values to zero.

Taking our previous example, the first object would have a value of nine, the second object would be loaded with eight, the third would have a value of seven, and so on to zero.

Similarly, if you had fifty-two cards, the first card would have a value of fifty-one, the second one would be fifty, the third would be forty-nine, and the last would be set to zero.

Normally, the ranges begin with zero. If you want to start from a different value, you can enter this value when you are setting up the action.

If we had fifty-two cards, Spread a value of 0 would generate numbers from 0 to 51. Spread a value of 5 would create a range from five to fifty-seven.


Using Spread a number with a card game

We'll use Spread a number to generate the suit and the value of the cards in a card game.

Note: This process is rather involved and it may be confusing if you're unfamiliar with GF Expressions.

See:

Expressions. Values, and Functions

Here's how to generate the suit and the value of a deck of cards:

1)	Create a series of fifty-two card objects to represent your deck. These objects need to have a different animation for each of the possible face values. To do this, assign each value to a different direction.

2)	We'll also need a different set of animations for the four suites, Clubs, Spades, Diamonds, and Hearts. Enter each sequence as a separate animation types.

3)	We could now give each card a unique identification number from 0 to 51, using a Spread a value of 0 in card(A) action.

In our game, we could work out the suit of the card using the following process:

1)	Number the cards in ascending order. We could do this by subtracting the value from fifty-two. Use the function Alterable Value of card(A). This sets the first card to one, the second to two, and the last card to fifty two.

2)	Convert the card number into the suit number by dividing the number by 4. Use the function: (52 - Alterable Value of card(A))/4. This would generate a value from 0 to 3, where 0=Clubs, 1=Spades, 2=Diamonds, and 3=Hearts.

3)	We could now use this value to display the appropriate animation type for the card. Use a Change Animation action and enter the calculation in the Expression Evaluator.

4)	To obtain a face value between 1 and 13. Take the previous range, and get the remainder after a division by 13. We can get the remainder using a function called "Mod". (52 - Alterable Value of Card(A)) Mod 13. This would give a number from 0 to 12. We could add one to this to get the required range.

5)	Our final expression would be ((52 - Alterable Value of Card(A)) Mod 13+1).

6)	Use the Change Animation Direction action to choose the correct animation for the selected card.


Flag Actions

In addition to an object's Alterable Values, each object has thirty-two Flags. These Flags are used to represent on or off values in your game. If you've cloned an object, each clone has a completely separate set of flags that can be read or changed independently.

The meaning of the Flags is entirely up to you. Depending on your game, the Flags could represent anything from:

A door which could be open or closed

A traffic light which could be red or green

An article which could be dropped or carried

A piece which could be black or white

A card which could be dealt or available

A switch which could be up or down

A digit which could be 0 or 1

Each alternative would be indicated by either on or off. In the case of the door, on could represent open, and off could represent closed.

You can read these Flags directly in your game, and use their status to trigger an appropriate set of actions. When you're reading a Flag, it will be converted to a number. A value of zero indicates off, and a value of one indicates on.

The Flag actions are:

Set flag On

Set flag Off

Toggle

When you're entering these options, you'll need to choose a Flag number from 0 to 31. Each Flag can represent a different possibility in your game.

Type the number directly from the screen, or move through the list using a slider bar. Click the Edit button to derive the number from an expression.

See:

Is a Flag off?

Is a Flag on?

Value of one of Internal Flags

The Expression Evaluator

Values, functions, and Expressions


Set Flag On

The Set Flag On action turns the chosen Flag on. Each object has up to thirty-two different Flags, numbered from 0 to 31. You can type this Flag number from the screen, change it using a slider, or calculate it from an expression.

Once you've set the Flag, you can test it in your game using the Is Flag On? and Is Flag off? conditions.

You can read the contents with the Flag function; 0 for off and 1 for on.


Set Flag Off

The Set Flag Off action switches an object's Flag to off. Enter a Flag number from 0 to 31 in the dialog box provided, or change the Flag using an expression. If you're using an expression, zero will represent off, and one will symbolize on.

See:

Set Flag On

Toggle

Is a Flag on?

Is a Flag off?

Value of one of internal Flags


Toggle

The Toggle action flips the Flag to a new state. Like a push button, the result will depend on the current value. If the button is on, it will change to off. If it's already off it will be turned on.

Choose the Flag using a number from 0 to 31. Each active object has it's on unique set.

See:

Set Flag On

Set Flag Off

Is a Flag on?

Is a Flag off?

Value of one of internal Flags


Text Object Actions

Text Objects let you display your titles, print the messages in an adventure, or create menus.

The Text can be displayed in any TrueType font on your machine. You can change the color or status directly from your game.

Each text object can be assigned to a number of different messages or "paragraphs", and you can change between them using an action from the Event or Storyboard Editor.

You can also change the object's "Alterable String". This can be loaded with the contents of a paragraph or with a number, and can be printed alongside your messages with the Display Alterable String action.

Here's a list of the available text actions:

Display Text

Erase Text

Flash Text

Set Color of Text

Set Paragraph

Next Paragraph

Previous Paragraph

Alterable String

Change Alterable String


Display Text

Display Text prints the selected paragraph on the screen. Each of your text objects can be displayed at several different locations.

You can position your text in several ways:

At actual coordinates copies your message to a fixed location on the screen. You'd use this action when displaying titles or menu lines.

Relative to object draws your text near an active object. This would be called in an adventure to display an object's description.

Options

The options buttons change the way your text will be positioned.

Originating from hot spot prints the text from the object's hot-spot.

Action point starts the message from the object's action point.

Located

This Located section adjusts the position according to the source object's direction.

User defined point positions the text a fixed distance away from the source. A line will be stretched from the "cross-hairs" to this object.

In direction of changes the position according to the source object direction. In the following diagram, you can see how the text moves depending on the direction of the object.

You could use this feature to display a message from a character's mouth, no matter which direction the character was facing.


Erase Text

The Erase Text action removes ALL copies of your text object from the screen. It hides your text in the background for future use. This action is perfect for the descriptions of an adventure game.


Flash Text

Flash Text flashes your message on and off at the selected screen position. Enter the coordinates from the keyboard, or read the values from an object. See the Display Text action for the available options.

After you've chosen your position you'll be asked to set the delay between flashes. You can switch the flashing off by calling the Erase Text or Display Text actions as appropriate.


Set color of text

The Set color of text action changes the color of your text object. The new color will be immediately displayed by all copies of this object on the screen.

You can use this action to generate warning signs or animated titles. The color can be chosen from sixteen possible shades. When you've selected one, the RGB (Red, Green, Blue) values will be displayed as part of the action description. This is purely for your information and can't be edited directly.

Note:  Each RGB value can range between 0 and 255 and is used to set the strength of a particular "component" of the color. The higher the value, the brighter the component. For example,

(0,0,0)	Black
(255,255,255)	White
(255,0,0)	Red
(0,255,0)	Green
(0,0,255)	Blue


Set Paragraph

This Set Paragraph action changes the message displayed by your text object. You'll see the effect on each copy of the message on the screen.

You can use Set paragraph to change the message depending on the events in your game. You might define a range of messages for each object in an adventure.

You can test the paragraph number using the Paragraph function.


Next Paragraph

Next paragraph displays the next line from the object's message list. All versions of the text object will be redrawn at their current screen positions.

You can use this action to gradually display a series of instructions on the screen, or scroll through a menu of commands. Type each line as a separate paragraph and use the Get paragraph function to read the selected line from your game.


Previous Paragraph

Previous paragraph displays the last message from the Text object's paragraph list. It's used for menus and the object descriptions in an adventure.

The new paragraph will be displayed by all copies of the current text on the screen.


Display Alterable String

Display Alterable String displays the current contents of the object's Alterable String to the right of the actual message. If you've displayed several copies of the object on the screen, each copy will be followed by the new text.

Use this action to display values and functions on the screen.

You can set the characters using the Change Alterable string action and copy the values using the Expression Evaluator. You can now convert the characters into text with a function called “Str$”, or select an equivalent option from the Special functions.


Change Alterable String

Change Alterable String enters a new line of characters into the object's Alterable String.

The Alterable String can be anything you wish, but it should be surrounded by double quotation marks.

"This is a string" is allowed but This is a string" will generate an error.

You can also add strings together with a + (plus)sign. For example,

"Test"+"Me" will create a single string containing "TestMe"


Question and Answer Object Actions

Question and Answer Objects display a multiple choice question on the screen, and let the user choose an appropriate response.

The question is shown at the top of the dialog box, and each of the possible answers is assigned to a button which can be selected with the mouse.

Ask the Question

Displays the question on the screen and waits for the user’s response.

You can test the result with:

"Is Answer Correct?"

"Is Answer False?"

"Is Answer Equal to a certain value?"


Ask the Question

The Ask Question action activates the Question and Answer Object, and displays its dialog box on the screen. The Games Factory will now wait for the player to select one of the answers.

You can test for the result using:

Is Answer Correct?

Is Answer False?

Is Answer Equal to a certain value?


Counter Object Actions

Counter Objects can be changed at any time. They're used to hold the values for your calculations, or as "triggers" to set off events.

You can enter your numbers either directly from the keyboard, or from an Expression Evaluator using the Edit button. You can also load values from another Counter or Active object using the Retrieve Data from object button.

The available actions are:

Set Counter

Add to Counter

Subtract from Counter

If the Counter is displayed on the screen, the new value will be updated immediately. You can test the Counter object with the Compare Counter object condition. You can read its value with the Current value function.

See:

Values, functions, and Expressions


Set Counter

The Set Counter action loads a Counter with a new value. You can enter this number from the keyboard, or click the Edit button to calculate the value from an expression.

You can test the Counter at any time with a Compare Counter object condition.


Add to Counter

Add to Counter loads the Counter with its current contents plus the selected increase.

You can enter this increase as a number or an expression.


Subtract from Counter

Subtract from Counter reduces the current Counter value by the selected amount. If the Counter is visible, the new contents will be displayed immediately.

You can enter the decrease as either a number, or an expression. Click the Edit button to display the Expression Evaluator.

You can test the Counter with the Compare to Counter object condition, and read its value using the Current value function.

See:

Set Counter

Add to Counter

Current Value


Button object Actions

Button objects can be changed at any time from within your application. You can replace the description, move the button to a new position or adjust the size. To edit a Button Object, in the Level Editor, click the Button Object with the right mouse button and select the Setup option.

Actions are created in the Event Editor. To access the actions, click a Grid Box under the Button icon with the right mouse button. A pop-up menu with the following options will be displayed:

Change Text

Highlight

Dehighlight

Set Radio Button / Change text

Set Radio Button / Select a radio button

Set Radio Button / Enable a radio button

Set Radio Button / Disable a radio button

Position / Select position

Position / Select horizontal position

Position / Select vertical position

Size / Set vertical size

Size / Set horizontal size

Visibility / Make object invisible

Visibility / Make object reappear


Change Text

Change Text enables you to enter new text for the Button object. After the change has been made, the button will be displayed in its new form.


Highlight

Highlight activates your button and tells The Games Factory when it has been selected with the left mouse button. You can test the status of a Button Object using a Button Clicked condition in your application.


Dehighlight

Dehighlight stops the user from selecting the button. It can be used with Push buttons, Check boxes, and Radio Buttons. A Dehighlighted button will be grayed out.

Here’s an example of a dehighlighted button:


Set Radio Button

The Set Radio button menu option provides special options for your Radio Buttons. You can use these options to change the text, enable or disable the button, or select it on the screen.

The options for Radio Buttons are:

Change Text

Select a Radio Button

Enable a Radio Button

Disable a Radio Button


Change Text

Change text enables you to change the text of your radio button. First, enter the button number into the expression box in the Expression Evaluator. The numbers start at zero and increase as you move down through the group of Radio buttons.

Enter the new text between the highlighted quotation marks. When this action is run, the new text will be displayed on the screen.


Select Radio Button

Select Radio Button selects a single radio button on the screen. Any previous selection will be reversed.


Enable a Radio Button

Enable a Radio Button prepares a single radio button for selection by the user. The button can now be enabled by clicking the button.


Disable a Radio Button

Disable a Radio Button stops the user from selecting the current radio button. Any attempt to select the button will be ignored.


Set Position

There are three Position options available for Button objects:

Select Position

Set Horizontal Position

Set Vertical Position

These options are used to move your button to a new location on the screen.


Select Position

When you choose Select Position, a dialog box will be displayed for you to enter the new coordinates for your button. You can enter these coordinates directly or drag the "cross-hairs" ( [image]) with the mouse to automatically read the coordinates.

The Relative to object option enables you to link the Button to another object on the display. Use this option to generate moving buttons for your applications.


Set Horizontal Position

Set Horizontal Position enables you to enter the Horizontal Position of the Button object. Enter the expression for the Horizontal Position into the Expression Evaluator or Click Edit, Retrieve data from an object.


Set Vertical Position

Set Vertical Position enables you to enter the Vertical Position of the Button object. Enter the expression for the Vertical Position into the Expression Evaluator or Click Edit, Retrieve data from an object.


Set Horizontal Size

Set Horizontal Size sets the width of your button on the screen. The Button will be redrawn immediately using your new size. You can change the size of any Button. If you modify a radio button, you’ll affect all of the buttons in a group.


Set Vertical Size

Set Vertical Size sets the height of your button on the screen. The Button will be redrawn immediately using your new size. You can change the size of any Button. If you modify a radio button, you’ll affect all of the buttons in a group.


Make Object Invisible

Make Object Invisible removes the selected Button from the screen. It can be replaced using the Make Object Reappear option from your application.


Make Object Reappear

The Make Object Reappear action draws a previously hidden Button on the screen. You can use it to create different sets of buttons for the different jobs in your application. Conceal your Button object by using a separate Make Object Invisible action or by enabling the Hide on Start check box in the Setup Multimedia Button Object dialog box.


Button object Conditions

Button objects have three available conditions:

Box checked?

Button Clicked?

Is Visible?


Box checked?

Box checked reads the status of a Button Object that you have defined as a check box. The option will be true if the user has enabled the Button.


Button clicked?

Button clicked calls your actions whenever the user selects the chosen button. This option works with Push Buttons, Check boxes, or Radio Buttons.


Is  Visible?

Is Visible calls your actions whenever the Button object is visible on the display. The actions will not be called if the Make object invisible action has been used.


Button object Functions

Button objects can be used to read a variety of information. You can read the Width, Height, X or Y coordinates, or the number of the currently selected radio button. The Button Object functions are:

Selected Radio(“object”)	Radio Selected

Button X size(“object”)	X Size

Button Y size(“object”)	Y Size

Button X position(”object”)	X

Button Y position(”object”)	Y


Radio Selected

Usage: Selected Radio(“object”)

This function gives the number of the currently selected radio button


X Size

Usage: Button X size(“object”)

This function reads the width of the chosen button.


Y Size

Usage: Button X size(“object”)

This function reads the height of the selected button.


X

Usage: Button X position(”object”)

This function reads the horizontal position of the button on the screen.


Y

Usage: Button Y position(”object”)

This function reads the vertical position of the button.


CD audio object Actions

CD audio objects add a professional touch to your games! If you're a serious developer, you can generate high-fidelity audio tracks for use in your CD-ROM games. You can include superb sound effects, real speech, or CD quality music.

Don't worry if you can't create your own CDs. (Recordable CD-ROMs are still quite rare!) You can still have a lot of fun producing your own jukeboxes, creating disco effects, or playing your favorite song for the background music in your game.

You can obtain the details of the CD using the Expression Evaluator. Use the Retrieve data from object button to get the number of available tracks, current position, and elapsed playing time.

To set an action for a CD-audio object, in the Event editor, click a Grid box under the CD-audio icon with the right mouse button. Choose an option from the pop-up menu:

Play a Track

Play track & continue

Play at position

Stop

Pause

Resume

Previous Track

Next track

Open Door

Close Door

Destroy


Play a track

Play a track plays a single track from the CD-ROM. The tracks are numbered starting at one.


Play a track & continue

Play a track & continue starts the CD playing at the specified track and continues until the CD either reaches the end or you halt it with a Stop or Pause action.


Play at position

Play at position plays the CD at a specified time position from the start of the disc. For example, if you’d recorded thirty minutes of music, a value of Fifteen minutes would start playing the CD from the middle.


Stop

Stop immediately stops the CD, and silences any sounds or music


Pause

Pause freezes the CD at the current position. You can now play a sampled sound effect or some MIDI music.


Resume

Resume restarts the CD from where it left off after a Pause action.


Previous track

Previous track will play the previous track on the CD. This action will have no effect if you're already on the first track.


Next track

Next track jumps to the next track on the CD. If you've already reached the end, this action will be ignored.


Open Door

Open Door opens the door of the user's CD player so they can insert a new disc!


Close Door

Close door is used once the user has placed a CD into the drive. This action will load it into your computer. Neat!


Destroy

The Destroy action removes a CD audio object from the screen and turns off any actions or events which use the object.

Note: Destroy only affects a single object at a time. Therefore, if you've created several clones of an object, you must destroy each clone individually.


CD audio object Conditions

CD Audio objects provide you with two conditions:

Compare to time position

Compare to track's elapsed time

You can also test the CD directly. Click a Grid box under the Special icon in the Event Editor with the right mouse button. Click Set Value to call the Expression Evaluator. Click the Edit button, and click Retrieve data from object. Click the CD object with the right button and choose one of the required functions from the pop-up menu:

Number of Current Track

Number of Tracks

Position in disk (1/1000s)

Length of disc (1/1000s)

Position in Current Track (1/1000s)

Length of Current Track (1/1000s)

Last Error number


Compare to time position

This condition tests how long the CD has been playing. The interval is measured in thousandths of a second, and starts from the first audio track on CD.


Compare to track's elapsed time

This condition tests how long the CD has been playing the current track. You can use this function to restrict the playback to a specific section of the track.


CD Audio object Functions

The CD audio functions let you use the statistics from a music CD inserted into your CD Drive. You can use these values to create read-outs on the screen or call up a series of appropriate actions when the CD reaches a particular track or time position.

The available functions are:

Track(“object”)	Number of current track

Maxtrack(“object”)	Number of tracks

PosInTrack(“object”)	Position in current track

Track Length(“object”)	Length of current track

Position(“object”)	Position in disc (1/1000s)

Length(“object”)	Length of disc(1/1000s)

Last Error(“object”)	Last error number


Number of Current Track

Usage: Track(“object”)

This function indicates the number of the track the CD is currently playing.


Number of Tracks

Usage: Maxtrack(“object”)

This function indicates the total number of Audio tracks on the CD.


Position in disk (1/1000s)

Usage: PosInTrack(“object”)

This function indicates the time in milliseconds from the start of the disc.


Length of disc (1/1000s)

Usage: Length(“object”)

This function indicates the length of the disc in milliseconds.


Position in Current Track (1/1000s)

Usage: Position(“object”)

This function indicates the time in milliseconds from the start of the current track.


Length of Current Track (1/1000s)

Usage: Track Length(“object”)

This function indicates the length of the current track in thousandths of a second.


Last Error number

Usage: Last Error(“object”)

This function indicates an error code from the CD player. If there's a problem, this will be NOT EQUAL to zero.


Edit object Actions

The actions available for the Edit object are:

Files / Load text file

Files / Load text file via a selector

Files / Save text file

Files / Save text file via a selector

Editing / Set text

Editing / Block / Replace selection

Editing / Block / Cut

Editing / Block / Copy

Editing / Block / Paste

Editing / Block / Clear

Editing / Undo / Undo

Editing / Undo / Clear Undo buffer

Control / Limit text size

Control / Focus / On

Control / Focus / Off

Control / Enabled / On

Control / Enabled / Off

Control / Read only / On

Control / Read only / Off

Control / Force Text modified flag / On

Control / Force Text modified flag / On

Control / Aspect / Set Text via a selector

Control / Aspect / Set background colour via a selector

Position / Set position

Position / Set horizontal position

Position / Set vertical position

Size / Set horizontal size

Size / Set vertical size

Visibility / Make object Reappear

Visibility / Make object Invisible

Destroy


Files

The File actions enable you to load the Edit zone from the disc. You can use these actions to change your text displays within your game.

Load Text file reads a list from a "TXT" or "ASC" file from the disc.

Load text file via a selector presents a standard file selector so that the users can choose the text file.

Save Text file stores the text permanently on a disk. The text will be saved in ASCII ("TXT") format. You can now load this text your game, or read it from a Windows Text Editor such as Wordpad.

Save text file via a selector displays a file selector, and lets the user save the text under a new name.


Load Text file

Load Text file loads the Edit zone from the selected file. The Text file must be in ASCII or "TXT" format. You can use this action to load Edit zones with new information during your game.


Load text file via a selector

Load text file via a selector displays a standard file selector, and lets the user choose some new text from the disk. The format should be in "TXT" or "ASC” format, but the extension can be anything you like. You can create these files using a standard Text Editor such as Wordpad, or save them using an option from your favorite Word processor.

You can also enter your text directly from an Edit zone, and store it onto the disc with the Save Text file or Save Text file via a selector options.


Save Text file

Save Text file saves your current Edit text onto the disc. It's stored as a text file in "TXT" or "ASC" format. Once the text has been saved, you can load it using the Load List File option, or pass it to an external Windows program such as a Text editor.


Save text file via a selector

Save text file via a selector displays a familiar windows file selector, and lets you save your text into a new file on the disc. Your text will be saved in ASCII ("TXT") format, and can be reloaded into any Window's Word processor or Text Editor.


Editing

The Editing actions provide you with a built in text editor for your games. You can use these actions to replace the current text, cut and paste information to the Windows Clipboard, or reverse the previous editing operation.

The Editing actions are normally linked to an icon or menu option, so they can be selected by the user.

The available editing actions are:

Set text

Block / Replace selection

Block / Cut

Block / Copy

Block / Paste

Block / Clear

Block / Undo / Undo

Block / Undo / Clear Undo buffer


Set text

Set text completely replaces the zone's contents with some new text. You'll be asked to enter this text when you're defining the action in the Event Editor. Enter your replacement text from the keyboard, or read it from another object using a GF function.

You can read the current text using the Get Text function. Supposing you were entering the location of some files to be tested by a Search object, you could add the search pattern to your Edit text using a function like:

Set Text Edit Text$("Wildcard")+*\*.txt"

Where "Wildcard" is the name of your Edit object.

You might want to surround your text with HTML start and end markers:

Set Text "<HTML>“+Edit Text$("Hypertext")+”</HTML>"

As you can see, there are lot of possibilities.

Note: Set Text automatically triggers a Has Edit zone just been modified? condition in your game. You may want to deactivate this condition using a Force Text Modified Flag to Off action.


Block

The Block actions let you cut and paste highlighted text into your Edit zone.

Replace selection substitutes your own text for the current selection.

Cut copies the highlighted characters into the Windows Clipboard, and removes it from the zone.

Copy saves the text into the Clipboard, leaving the current version intact.

Paste inserts the contents of the Windows Clipboard at the current cursor position.

Clear deletes the selected text.

Undo / Undo reverses the previous editing operation.

Undo / Clear Undo buffer erases the Undo information completely.


Replace Selection

Replace Selection replaces the currently highlighted text with some new characters. You can type your text either directly into the Event Editor, or read it from a GF function in the Expression Evaluator.

You can read the existing selection using the Get Selection function. You can now manipulate this using the standard text operations. For example,

Replace Selection "<P>“+Edit Select$("Edit object")+”</P>“

This function will add a HTML paragraph mark to the current selection.

Replace Selection Edit Text$("Zone 1")+Edit Select$("Zone 2")

This function adds the contents of Edit "Zone 1" to the highlighted region of "Zone 2".

Note: Set Text automatically triggers a Has Edit zone just been modified? condition in your game. You may want to deactivate this condition using a Force Text Modified Flag to Off action.


Cut

Cut removes some highlighted text, and saves it on the Windows Clipboard. This action is equivalent to typing CTRL + X from the keyboard.

Your users can highlight the text to cut using the normal method. Click the first character, hold down the left mouse button, and drag the mouse over the selection. They can now paste this text into any currently open program, or copy it into another Edit zone.

You could use this action to cut the user's text when they clicked an appropriate icon.


Copy

Copy saves your highlighted text directly onto the Windows Clipboard. This action is equivalent to the user pressing CTRL + C on the keyboard.

You can trigger this action when the user clicks a Copy option from the screen.

Once the user has copied text, they can paste it into another Windows program using the standard menu options or another Edit zone.


Paste

Paste copies some text from the Windows Clipboard into your Edit zone. This action is equivalent to the user pressing CTRL + V on the keyboard.

The text on the clipboard will be inserted at the current cursor position. Any characters below this point will be moved downwards to make room for the new lines.


Clear

The Clear action removes highlighted text from your Edit zone. It's equivalent to pressing DELETE on the keyboard.

The highlighted text isn't completely destroyed, a copy is kept in the Undo buffer for future use. You can erase this copy using the Clear Undo buffer action, or return the selection back to normal with "Undo".


Undo

Undo actions provide a simple way for the user to correct their mistakes.

Undo replaces your text with the previous version stored in the Undo buffer. Clear Undo buffer erases the Undo information stored in memory.


Undo

Undo reverses the user's editing operations and lets them recover from mistakes. It's equivalent to pressing CTRL + Z on the keyboard.

Whenever the user changes some text, or uses Cut or Clear actions, The Games Factory will save the original text into a special memory area known as the Undo buffer. Use Undo to replace the new text with the previous version.

Use the Clear Undo buffer action in your game to clear valuable memory space being used by the copies of your text.


Clear Undo buffer

Clear Undo buffer deletes the information stored by the Undo feature, and returns the memory to the Windows system. You can call this action to save space whenever you load a new text file from a disk, or to ensure that a specific piece of information has been permanently destroyed.


Control

The Control actions change the effect of your Edit object on the screen. There are a range of Control options to choose from:

Limit Text size sets the maximum number of characters which can be entered into the zone.

Focus / On activates your zone, and uses it for all future editing operations.

Focus / Off deselects your object from your game.

Enabled / On reactivates the Edit zone after it's been "grayed-out".

Enabled / Off stops the Edit zone from being chosen by the user.

Read only / On prevents your users from editing the objects contents.

Read only / Off enables the user to edit the text again.

Force Text Modified Flag / On tells the Windows system that the text has been altered in some way.

Force Text Modified Flag / Off resets the system so you can detect any further changes.

Aspect / Set font via a selector displays a font selector and lets the user choose a new style for the Text.

Aspect / Set background colour via a selector lets the user enter the background colour.


Limit Text size

Limit Text size enters the maximum number of characters that can be loaded into the Edit object. If the user attempts to type in more than the specified number of characters, the cursor will stop at the last character.

You can enter the Text size either directly from the Event Editor, or read it from a function as needed.


Focus

Microsoft Windows only lets you control a single Edit  box at a time. If you have several of these objects on the screen, the user will be able to choose between them by simply clicking their contents with the mouse.

In technical terms, the currently selected object has the "focus" of the user's attention. You can set this focus using the Focus, On action and deactivate it using Focus, Off.


Focus / On

Focus/On activates your object, and uses it for all future mouse or keyboard operations. If the zone is editable, the Text cursor will be displayed at its previous position.


Focus / Off

Focus/Off removes the Text cursor from the current Edit box. The user can now select a new box to be edited. The position of the text cursor will be saved for later use.


Enabled

The Enabled actions activate or deactivate the Edit zone. If it’s disabled, it will be grayed out on the screen and the user won’t be able to select it with the mouse or enter new text.

On activates the Edit zone.

Off deactivates the Edit zone


Enabled / On

Enabled/On turns your Edit zone back on after it's been "grayed out" using the Enabled, Off action. The user can now select a zone using the mouse. If the zone is editable, they can enter new characters.

See:

Enabled Off


Enabled / Off

The Enabled/Off action "grays out" the Edit object and stops it from being selected by the user. You can return your object back to normal using the Enabled, On action.


Read only

Read only actions toggle the Read only mode to on or off. If Read only is activated, the user won’t be able edit the Text and the contents will be fixed in the current state. You can choose between the following actions:

On blocks any further editing operations.

Off lets the user type in some new text from the keyboard.


Read only / On

Read only/On makes the Edit zone "Read only". As the term suggests, any attempt to edit its contents will be ignored.

You can set this option as the default setting using the Read only zone in the Setup dialog box. The Read only feature is perfect for static text displays and descriptions.

See:

Read only / Off


Read only / Off

Read only/ Off reverses the Read only action, and lets the user edit the text. You can save their entries onto the disc using the Save Text, or Save Text via a Selector actions, or read them from your game using the Get Text function.

See:

Read only / On


Force Text Modified Flag

The following actions provide you with complete control over the Has Edit zone just been modified? condition.

On triggers the condition.

Off resets it.


Force Text Modified flag / On

Force Text Modified flag, On tells The Games Factory that the text has been changed since the last editing operation. It forces the Has Edit zone just been modified? condition to be "True".


Force Text Modified flag / Off

Force Text Modified flag, Off tricks the game into thinking that the current text is unchanged, even if it has been radically altered. Therefore, the Has Edit zone just been modified? condition will be "False".

This action is used to reset the system after you've performed a Set Text, or Replace Selection action, or you've acted on the user's commands. The condition will now become "True" when the user makes additional changes to the text.


Aspect

Aspect actions let the user customize the Edit zone from within the game. There are two possible actions:

Set Font via a selector allows the user to select a new TrueType font for the text.

Set Background colour via a Selector allows the user to change the background colour of the editing area.


Set Font via a selector

Set Font via a selector displays a standard GF font selector so the user can pick a new Text style for the zone. You can assign this action to a Button object so that the user can adjust the display to their own needs.

The user might, for instance, increase the size of the font if they're running the program in a high resolution screen mode, or reduce it if they have an extra large monitor.

See:

Set Background colour via a Selector


Set Background colour via a Selector

Set Background colour via a Selector presents your users with a familiar selection box so that they can choose a new colour for the background area. You would normally trigger this action from a Button object or a Key-press. This feature would allow the user to customize the display to their precise requirements.

See:

Set Font via a Selector


Position

The Position menu lets you move your Edit zone around the screen. There are three possible actions:

Set position moves the object to either a fixed position, or to the location of a target object on the screen.

Set horizontal position moves the object left or right across the display.

Set vertical position moves the object’s box up or down.

Note: All coordinates are measured from the top left corner of the Edit zone.

It's a good idea to ensure that each Edit  box is completely separate on the display. If you allow two editable objects to overlap, you can get odd effects when the user makes a selection.


Set position

Set position enables you to place your Edit zone at specific coordinates, or move the Edit Zone over another object on the display.

Enter the position for the Edit object into the Set position dialog box. If you want to place your object over a specific screen region, enter new coordinates into the X and Y boxes or drag the "cross-hair" to enter the new coordinates. The coordinates are measured from the top left corner of the zone.

If you'd like to read the position from another object, enable the Relative to button and choose the object from the selector. This provides a useful way of moving an Edit zone on the screen. First create an active object, and assign it to a movement system such as Mouse or Eight-direction. You can now make this object invisible using a Make object Invisible action at the start of your level. Once you've set this up, you can copy the object's position using the Set position action at regular intervals. You might use an Every condition for this purpose. The Edit object will follow the path assigned to the invisible object.

See:

Set horizontal position

Set vertical position


Set horizontal position

Set horizontal position moves your Edit zone horizontally across the screen. When you're defining this action, you'll be asked to enter the new X coordinate. This coordinate is measured from the left of the game window to the left of your box. You can enter the coordinate either directly, or click the Edit button, and read the value using a function.

Here are a few ideas.

Take the position from the Mouse pointer using an "XMouse" function.

Move the zone left using the Get X position function:

Edit X Pos("Edit")-1

Where "Edit" is the name of your object.

Move the Edit zone right using the function:

Edit X Pos("Edit")+1


Set vertical position

Set vertical position moves your Edit zone up or down on the screen. When you're defining the vertical position, you'll be asked to enter a Y coordinate, measured from the top of the game window to the top of your box.

You can enter the coordinate either directly from the keyboard, or click the Edit button, and read the value using a function. Here are a few ideas:

Use the value from the mouse coordinates using the "YMouse" function.

Move the object using the "Get Y position" function like so:

Edit Y Pos("Edit 1")-1

Where "Edit" is the name of your object, and "Edit Y Pos" reads the current position of your zone.

Move the object down using the function:

Edit Y Pos(“Edit 2")+1


Size

The Size menu changes the size of the Edit zone on the screen

Set horizontal size only changes the width.

Set vertical size changes the height.

Note: All dimensions represent the inside of the Edit zone. If your object has a border, or uses scroll bars, the actual screen size could be different.


Set horizontal size

This changes the width of your Edit zone on the screen. You'll be asked to enter this when you are defining this action from the screen. You can enter the width either directly from the keyboard, or read it from a function using the "Edit" option.

In each case, the new width will be for the INSIDE of the box.

See:

Set Size

Set vertical size

Get X Size

Get Y Size


Set vertical size

This enters a new height for your Edit zone on the display. You can enter it either as a simple number, or click on the "Edit" option to calculate it from a function. In both cases, the height refers to the inside of the box. If the Edit zone has any borders or scroll bars, it might be a little larger.

See:

Set horizontal size

Set size

Get X Size

Get Y Size


Visibility

Use the Visibility options to conceal your Edit zones in the background, and display them as needed in your game.

Make object invisible hides your object from view.

Make object Reappear displays it again.


Make object invisible

This hides your Edit zone away, and stops it from being edited by the user. You can display the zone at any time using a Make object Reappear action.


Make object Reappear

Displays a previously hidden Edit zone on the screen. It's used after you've concealed the object using a Hide object on Start-up option from the Setup dialog box, or called a Make object Invisible action in your game.


Destroy

The Destroy action removes your Edit zone permanently from the display, and loses any changes you've made to its contents.


Edit object Conditions

The conditions that are available for Edit objects are:

Has Edit zone just been modified?

Does Edit zone have input focus?

Is Edit zone enabled?

Is Edit zone visible?

Is undo information available?

Is Text a number?

Is Text Selected?


Conditions

You can test these Edit objects for a range of conditions:

Has Edit zone just been modified? tells you when the user changes something on the screen.

Does Edit zone have input focus? tells you that the Edit zone has been chosen by the user.

Is Edit zone enabled? tests if the zone can be selected by the user.

Is Edit zone visible? tests if the object is visible on the screen.

Is undo information available? tells you if the Undo option is available.

Is Text a number tells you if the Text represents a whole number.

Is Text Selected? tells you that the user has highlighted some text with the mouse.


Has Edit zone just been modified?

Has Edit zone just been modified? indicates that the current contents of the Edit zone have changed in some way. There are three possibilities:

1)	The user entered something new using the keyboard.

2)	The user has cut or pasted a selection of text from the editing zone.

3)	Your game has loaded a new text file into the zone from the disc.

After the text has been changed, you can copy the new contents into your game using the Get Text function. You can set this condition directly from your game using the Force Text Modified Flag actions.


Does Edit zone have input focus?

Does Edit zone have input focus tests your Edit zone, and tells you if it's waiting for the user's input. The condition will "True" when the text cursor is active in the current zone, and "False" if the user is editing something else.

Microsoft Windows lets you create large control panels with dozens of different editing areas. If you’ve defined several Edit objects, the users can click a zone to select it. If you've enabled the Tab Stop option in the setup dialog box, they use will be able to move through the available lines using TAB or SHIFT + TAB keys.

You can also activate your Edit zones directly from your game using the Enabled, On action.


Is Edit zone enabled?

Is Edit zone enabled? tells you whether the Edit zone can be selected by the user. By default, each zone can be activated by clicking it with the mouse, but you can "gray out" the text using the Enabled, Off action, and turn your zone on again with Enabled, On.

If you’re unsure about the current status of the object, you can test if the zone is available using the Is Edit zone enabled?” condition.


Is Edit zone visible?

Is Edit zone visible? will be “True” if the Edit zone is displayed on the screen. You can conceal your objects using either the Hide on Start option from the Setup menu, or with the Make object Invisible action in the Event Editor. You can display the objects again using the Make object Reappear action.


Is undo information available?

Is undo information available? indicates if the user can perform an Undo operation at the current position. Whenever the user enters some new information, or deletes an area of text, the previous version will be saved in a special memory area known as the Undo buffer. You can return this text to the screen using the Undo action, or erase it with a Clear Undo buffer operation.

This condition provides a quick way of checking the status of the Undo buffer before calling an Undo action.


Is text a number?

Is text a number? tells you that your Edit zone contains a number. If this condition is true, you can read the result using the Get Numeric Value function.

You could use this condition to test that the user had entered an acceptable value for an order quantity. If not, you could display a message such as "Please enter a whole number of items" so that the user could try again.

The text can include negative or positive signs and round brackets. If there’s a decimal point, only the whole part of the number will be accepted. For example, 3.1425926 will be interpreted as 3.


Is text selected?

Is text selected? will be "True" if the user has highlighted some text using the mouse.

You can read the user's selection from your game using the Get Selected Text function. You can change the selection using the Replace selection action, or manipulate it with the Cut, Copy, Paste, or Clear commands.


Edit object Functions

Here's a list of the available functions:

Get text	Edit Text$("Object")

Get selection	Edit Select$("Object")

Get X position	Edit X Pos("Object")

Get Y position	Edit Y Pos("Object")

Get X size	Edit X Size("Object")

Get Y size	Edit Y Size("Object")


Edit object Functions

Edit zones provide you with the following functions:

Get text returns the entire Text from the Edit zone.

Get selection returns the user’s current selection

Get Numeric Value converts the Text into a number.

Get X position returns the X coordinate of the Edit zone on the screen.

Get Y position returns the Y coordinate of the Edit zone on the screen

Get X size returns the width of the editing area

Get Y size returns the height of the editing area.


Get Text

Usage: Edit Text$("Object")

This function reads the entire contents of the current Edit zone. You can pass this text to another  object, such as a Text object or an Extension, and manipulate it using the built-in functions.


Get Selection

Usage: Edit Select$("Object")

This function reads the contents of the currently highlighted Text lines. You can now load these lines into a Text object or Edit object.

See:

Get Text

Cut

Paste

Delete


Get Numeric Value

Usage: Edit Value("object")

This function interprets your text as number, and returns its contents to your game. If the zone doesn't contain a number, or is in the wrong format, you'll get a value of zero instead.


Get X position

Usage: Edit X Pos("Object")

This function reads the horizontal position of the Edit zone on the screen. It provides the X coordinate, measured from the left of the game window to the left of the current box.

See:

Get Y Position


Get Y position

Usage: Edit Y Pos("Object")

This function reads the Y coordinate the Edit zone on the display. The coordinate value is measured from the top of the game window to the top of the current box.

See:

Get X Position


Get X size

Usage: Edit X Size("Object")

This function reads the width of the inside of your Edit zone.

See:

Get Y size


Get Y size

Usage: Edit Y Size("Object")

This function reads the height of Edit zone. The value refers to the inside of the box. It does not include the areas used by any scroll bars or border line.


FLI object Actions

You can control your Animation directly from the game using a range of powerful actions.

General actions

Movement / Stop

Movement / Start

Movement / Set Speed

Movement / Set Maximum Speed

Movement / Wrap Around Play area

Movement / Bounce

Movement / Reverse

Position / Select Position

Position / Set X coordinate

Position / Set Y coordinate

Special FLI object actions

Animation / Start

Animation / Stop

Animation / Pause

Animation / Resume

Animation / Change Frame Duration

Animation / Goto Frame

Animation / Next Frame

Animation / Previous Frame

Visibility / Make object Invisible

Visibility / Make object Reappear

Destroy


Animation

The Animation menu lets you change the effect of the FLI Animation. You can move between the Frames, control the speed, and control the duration of the effect. The available Animation actions are:

Start

Stop

Pause

Resume

Next Frame

Previous Frame

Go to Frame...

Change Frame Duration


Start

Start replays the entire FLI Animation effect from the beginning.

See:

Stop

Pause

Resume

Go to Frame

Next Frame

Previous Frame


Stop

Stop stops the Animation sequence at the present Frame. You can replay it from the first frame using the Start action.

See:

Start

Pause

Resume

Go to Frame

Next Frame

Previous Frame


Pause

Pause freezes the FLI Animation at the current frame. This action is similar to Stop. The only difference, is that you can restart the Animation from where it left off using the Resume action.

See:

Start

Stop

Resume

Go to Frame

Next Frame

Previous Frame


Resume

Resume restarts a previously frozen Animation sequence. This action is used after a Pause action to continue the sequence from the current frame.

See:

Start

Stop

Pause

Go to Frame

Next Frame

Previous Frame


Next Frame

Next Frame moves to the next frame in your FLI Animation sequence. If you’ve already reached the end, this action will be ignored.

You’d use this action after you’ve stopped the Animation using Stop or Pause. You can use this action to manually switch between frames at the specified point in your game.

See:

Stop

Pause

Start

Go to Frame,

Previous Frame.


Previous Frame

Previous Frame jumps immediately to the previously displayed Animation Frame. This action will be ignored if you’re already at the first frame in the animation.

You’d use this action after you’ve stopped the Animation using Stop or Pause. You can use this action to manually switch between frames at the specified point in your game.

See:

Stop

Pause

Start

Go to Frame,

Next Frame.


Go to Frame

Go to Frame jumps directly to the chosen Animation Frame. You can use this action after a Stop action to take manual control over your Animation.

Enter the destination frame number in the box provided, or click the Edit button to calculate the value using an expression.

See:

Start

Stop

Pause

Next Frame

Previous Frame


Change Frame Duration

Change Frame Duration changes the amount of time each frame will be displayed on the screen. You can use this action to control the Animation Speed. The longer the duration, the slower the Animation will play.

See:

Frame duration


Visibility

The Visibility menu lets you hide or show the Animation on the screen. There are two possible actions:

Make object Invisible hides the Animation in memory. The animation will keep running, but you won’t be able to see the results.

Make object Reappear displays a previously hidden Animation sequence, starting at the Current Frame.


FLI object Conditions

You can test your FLI objects in a variety of ways. Here is a list of the available conditions:

Standard movement conditions

Collisions / Another object

Collisions / Overlapping another object

Collisions / Backdrop

Collisions / Is "object" over an obstacle background

Movement / Is "object" Stopped?

Movement / Is "object" Bouncing?

Movement / Compare Speed of "object" to a value

Movement / Compare Acceleration of "object" to a value

Movement / Compare Deceleration of "object" to a value

Movement / Has "object" reached the end of its path

Movement / Has "object" reached a node in the path

Position / Test position of "object"

Position / Compare X position to a value

Position / Compare Y position to a value

Position / Is "object" getting close to window's edge

Direction / Compare direction of "object"

Special FLI conditions

Compare to Current Frame

End of Animation

Is the FLI Animation Running?

Is the FLI Animation Paused?

Is the FLI Animation Invisible?

Is the FLI Animation Visible?

User clicks within the FLI Animation


Compare to Current Frame

Compare to Current Frame triggers your actions when the FLI reaches a selected frame number. The available frame numbers start at the number one. When this frame number is reached, you can play a sound track, or display an appropriate message on the screen.

See:

Compare to Current Frame

End of Animation

Is the FLI Animation Running?

Is the FLI Animation Paused?

Number of Current Frame


End of Animation

End of Animation tests for the end of your FLI Animation sequence. You can replay it from the beginning using Start.

See:

Compare to Current Frame

Number of Current Frame

Is the FLI Animation Running?

Is the FLI Animation Paused?


Is the FLI Animation Running?

Is the FLI Animation Running? tells you if the Animation is still running on the screen. If so, you can block the user’s actions, or stop your game for the duration of the animation.

See:

Number of Current Frame

Compare to Current Frame

End of Animation

Is the FLI Animation Paused?


Is the FLI Animation Paused?

Is the FLI Animation Paused? reports back when the FLI Animation has finished. You can now move to a new Storyboard Level, or start a new Animation on the screen.

See:

Compare to Current Frame

End of Animation

Is the FLI Animation Running?


Is the FLI Animation Invisible?

Is the FLI Animation Invisible? tests that the Animation has been hidden in the background with a Make object Invisible action. This condition will be true if the sequence is not currently being displayed on the screen.

See:

Is the FLI Animation Visible?

Make object Invisible

Make object Reappear


Is the FLI Animation Visible?

Is the FLI Animation Visible? tells you that the Animation is currently visible on the screen.

See:

Is the FLI Animation Invisible?

Make object Invisible

Make object Reappear


User clicks within the FLI Animation

User clicks within the FLI Animation tests for a left or right mouse click in the animation area. You can use this to generate animated buttons and diagrams that react when they’re selected.


FLI object Functions

FLI objects can be tested for the following attributes:

General functions

Movement

Speed("object")	Speed

Acc("object")	Acceleration

Dec("object")	Deceleration

Position

X("object")	X coordinate

Y("object")	Y coordinate

X Left("object")	X coordinate of left edge

X Right("object")	X coordinate of right edge

Y Top("object")	Y coordinate of top edge

Y Bottom("object")	Y coordinate of bottom edge

Special FLI functions

Current Frame("object”)	Number of Current Frame

Current Frame("object")	Number of Frames

width("object”)	Width of Animation

height("object”)	Height of Animation

Frame duration("object”)	Frame duration


Number of Current Frame

Usage: Current Frame("object”)

This function reads the number of the current FLI Animation Frame, starting at one.

See:

Number of Frames


Number of Frames

Usage: Current Frame("object”)

This function reads the total number of Animation Frames in the sequence.

See:

Number of Current Frame


Width of Animation

Usage: width("object”)

This function reads the width of the Animation on the screen.

See:

Height of Animation


Height of Animation

Usage: height("object”)

This function reads the height of the Animation on the screen.

See:

Width of Animation


Frame duration

Usage: Frame duration("object”)

This function reads the length of time each Frame will be shown on the screen, in units of a 1000th of a second.


Actions

Actions are used to do things, like playing a sample, setting a value, or destroying an object. Actions are dependent on the results of a test or "condition" in your game.


Action Box

An Action box enters an action into the Event Editor. Actions can be added by clicking the action box with either the left or right mouse button.

Clicking the left button selects the actions and allows them to be dragged and dropped into a new position.

Clicking the right button displays a menu that allows you to choose a new action for your game.


Action Icon

The Action Icon shows the type of action being entered into the Event, or Step Through Editors.


Action Marker

The Action Marker is a small indicator used in an Action box in the Event Editor. The action marker indicates that there is an action of a specific type assigned to that object. You can select the Action Markers with the either the left or right mouse button.

Clicking the left button selects the actions and allows them to be dragged and dropped into a new position.

Clicking the right button displays a menu that allows you to choose a new action for your game.


Action Point

The Action Point is a place on an object where an action will occur. An Action Point is used to assign an action to an object that needs to be released from a specific part of another object. For example, bullets need to be shot from the barrel of the gun.


Action Order Editor

The Action Order Editor allows you to change the order that actions will occur in your game when the test for a specific condition becomes true.


Active Objects

Active Objects are objects that respond to events in your game. Examples of active objects include spaceships, bullets, characters, bricks, balls, and racecars.


Alterable Attributes

Alterable Attributes are features that can be changed using actions. Examples of alterable attributes include coordinates, speed, and alterable values.


Alterable string

An Alterable string is used by a Text Objects to hold a fragment of text or a message. Alterable strings can be loaded using a Text paragraph, read from another object, loaded with a number, or entered from the keyboard using the "Ask for Input" option.


Alterable Values

Alterable Values store vital information needed for the running of the game. The Games Factory provides three Alterable Values for each object. These are represented by the letters A, B, or C. They can take any WHOLE value between -2000,000,000 and +2000,000,000. Fractions such as 1.5, or 3.141 are NOT allowed.

Alterable Values hold the statistics in an RPG. For example, the status of an attacker, or the value of an object.


Animation

Animation brings the objects in your game to life. The Animation is created by displaying a number of still pictures or "Frames" one after another in sequence. By making small changes to the object in each frame, the object will appear to move when the frames are played in sequence. Animations are supplied for most of the objects in The Games Factory, but it is easy to create your own animations using the built in Animation Editor.


Animation Frame

An Animation Frame is a single picture displayed in an Animation sequence.


Animation Sequence

An Animation Sequence is a series of still pictures used to animate an Active Object on the screen.


Arcade Game

An Arcade game is a type of game that pits a number of fast moving "bad guys" against the player. An example of an arcade game is Space Invaders.


Attributes

Attributes are any values or information that are used by an object. Typical examples of attributes include the Alterable Value of an Active Object, the Animation file of an FLI, and the Text in a Text Object.

There are two types of attributes: Alterable Attributes and Fixed Attributes.

Alterable Attributes are features that can be changed using actions. Examples of alterable attributes included coordinates, speed, and Alterable Values.

Fixed Attributes are features that can not be changed during a game. Examples of fixed attributes include the size of an object and the available movement directions.


Automatic Icon

An Automatic icon is used to display an object by using a small version of the first picture in the Animation sequence for that object. Automatic icons keep track of this picture, and automatically change the shape of the icon whenever the object is edited.


AVI

AVI stands for Audio Visual Interleaved. It is a file format for playing "Video for Windows" movie clips.


Backdrop

A Backdrop is a static picture that is used for the background area in your game.


Backdrop Objects

Backdrop Objects are objects that remain in the same position for the duration of your game. These objects are used for obstacles such as walls, doors, or rocks. A backdrop object can be changed to a Quick Backdrop object or an Active object in the Level Editor.


Backdrop Obstacles

Backdrop Obstacles consist of Backdrop or Quick Backdrop objects which block the movement of an Active Object in your game. Backdrop obstacles can added to your game using the Level Editor.


Ball Objects

Ball Objects simulate the movement of a bouncing ball. Ball Objects are great for games like Rebound, Arkanoid, Tennis, and Pinball. Ball objects can also be used for general purpose objects which can be controlled directly from your game.


Booting-Up

Booting-Up is a technical term for the process of starting up a program on the computer. It comes from the fanciful idea of pulling yourself up by your bootstraps.


Boot-Up Screen

The Boot-Up screen is displayed at the start of a program before the program is run.


Bounce Randomizer

The Bounce Randomizer adds variety to the way a Ball Object bounces against other objects in your game. The higher the Randomizer is set, the more random the bounces of the ball object will be.


Box mode (Collision detection)

Box mode is a method of collision detection between objects in your game. When Box mode is enabled, each object in your game is enclosed in an invisible box. These boxes can be tested using the "collision" option to find out if two boxes are touching and therefore, a collision has occurred.


Box mode (Capture menu)

Box mode imports a series of images from a disk using a single operation. Box mode is ideal for creating Animation sequences.

The format of this file is important.

The first point in your picture should be set to the colour used by your background (usually zero or transparent). The second should hold the colour of your box (usually 1).

Each image should now be surrounded by a ONE point thick box.


Button objects

Button objects let you generate clickable buttons on the screen. You can test these buttons from the Event Editor, and assign actions to them as needed.


Capture Menu

The Capture Menu loads an object with some previously prepared graphics from the disc. The Capture Menu is activated using the Import feature.

Transparent mode ignores anything drawn in the colour zero.

Box Mode grabs a whole series of images surrounded by boxes.

The top left point in this file should be set to the Transparent colour (normally zero).

The next dot should be set to the line colour used for your boxes. Each box should be exactly ONE point thick.

Full Window loads the entire picture.

Cancel returns you to the Picture Editor or Icon Editor as appropriate.


.CCA  files

These store Corel Click & Create applications on the disc. Providing the Click & Create application uses the standard GF object types, you can load these directly into The Games Factory. If you try to access other objects, the operation will be aborted automatically.


CD ROM

A CD-ROM is a special type of Compact Disc that can contain large amounts of graphics, text, or music for use in your games. The contents of a CD-ROM can not be changed once they have been created and therefore are used as Read Only Memory.


CD Audio Objects

CD Audio Objects are used to play an audio track from a normal music CD or from a CD-ROM.


Child Game

A "Child game" is a separate The Games Factory game with its own set of Storyboard levels, objects, actions, and events. It is launched from another The Games Factory game using a game Level. When the child game has finished running, the game will return control to the "Parent Game".

See: "Parent Game"


Child Objects

Child Objects are created by another object during the course of a game. Typical examples are the bullets in an Arcade game, or the small rock fragments in games like Asteroids.

See: "Parent Object"


Clone

A Clone is a copy of an object which has the same definition, but its own existence on the screen. These clones can be created clicking an object in the Object Selector and dragging and dropping it onto the playfield. Each clone has its own set of values, coordinates, and attribute options.


Collision Detection

Collision Detection is the process of testing for impacts between various objects in a GF game. There are three available tests for Collision Detection between objects:

Active Object tests for a single collision between two objects.

Overlapping tests whether the selected objects are continually overlapping on the screen.

Obstacle tests whether an object has hit a background obstacle.

Collisions can be tested in either box mode or fine mode. The mode you use to detect collisions can selected by choose the mode by setting a button in the Preferences dialogue box.


Command Icons

Command icons call up a specific option from the GF system.


Comments

Comments are text items that are added to the Event Editor to help explain your game to other users or developers. They are typed in from the keyboard, and can be highlighted in a variety of different styles.


Computer Controlled Movements

Computer Controlled Movements are used to propel an object through a pre-programmed movement pattern generated by the computer.

Available movement systems include:

Bouncing Ball movement where an object moves in a random bouncing pattern.

Path Movements where an object follows a specified path. This type of movement can be used for the aliens in an arcade game.


Conditions

Conditions are single tests that are performed at frequent intervals throughout the course of your game. Conditions like a player pressing a key, an object moving into a specified zone, or an object's value exceeding a certain range can be tested.

Conditions can be either true or false. If they are true, the selected actions will be performed. If they are false, the actions will be ignored.

See: Events


Coordinates

Coordinates are used to give the distance of an object from a fixed reference point or origin.

The position is read in two directions. The X coordinate measures the horizontal distance from left to right, and the Y coordinate measures the vertical distance from top to bottom.

The two coordinates are usually enclosed in brackets, and are displayed as follows:

(X-Coordinate, Y-Coordinate)

Example:

(10,50) Ten units right, 50 units down

(-10,-50) Ten units left, 50 units up

See: "X-Coordinates", "Y-Coordinates"


Counter Objects

Counter Objects are used to store the numbers in your game. Counter objects can be used for things like fuel gauges, speedometers, or the read-outs from the dials in the cockpit of a spaceship.

The counters can be displayed as a bar, an animation, or a simple number. Counters can also be hidden in the background for use in your own calculations.

Counters can be changed at any time using an Action from the Event Editor.


Create new object

Create new object is found in the Level Editor and is used to add a new object to a game. Create new object provides a list of the available object types that are ready for use in your game.


Data

Data is another word for information.


Device Driver

A Device Drivers is an independent program which manages a specific part of your computer system. Device Drivers are used for controlling printers, joysticks, CD players, or Level objects.


Dialog box

Dialogue boxes contain a list of options which can be selected with the left mouse button. A dialogue box appears in a window.

The following is an example of a dialogue box:


Display Order

Display Order is the order that your objects will be displayed on the screen. Normally, your objects will be displayed in the same order that they were created, so a new object will appear in front of an existing object. You can control the display order using the View option from the object's pop-up menu.


Edit button

The Edit button appears when you are entering a value into a dialogue box. Clicking the Edit Button displays the GF Expression Evaluator so you can enter an expression. Now, you can click on the Retrieve Data from an object button to access a range of GF functions.


Edit object

An Edit object is used to create an editable text field in your GF game. You can use an Edit object to create a User Entry zone or an Input field.


Eight Direction Movement

Eight Direction Movement assigns an "Active Object" to one of your players. This object can now be controlled using either the Joystick or the Keyboard.

By default, you can move these objects in a maximum of eight different directions. If you want to restrict your object still further, you can choose the possible movement directions.


Events

Events enable your game to react to certain situations. An event contains a series of "conditions" that are set to occur as the game is completed. If all of the conditions are true, the selected actions will be performed. If any one of the conditions are False, the actions will be ignored.


Event Editor

The Event Editor provides the intelligence for your games. All of the possible events and the required actions to be taken if all of the conditions are met are specified in the Event editor. The Editor is arranged as a simple grid, rather like a spreadsheet.


Event Grid

The Event Grid is a series of boxes which are displayed in the Event Editor" Each box can contain an optional set of actions which will be performed when the event becomes true.


Event Group

An Event Group holds a series of Events, Conditions, and Actions which can be treated as a single unit in your game. Event Groups can be either local or global.


Expression

Expressions are calculations involving numbers, Alterable Values, or Functions. GF expressions can also take their values from an object.

Here are a few examples:

Random(5)+1

Value("Ship")*10

Width("AVI")/4


Expression Evaluator

The Expression Evaluator is a form of calculator that can be called up using the Edit button from a GF dialogue box.


Fade

A Fade is the process of dissolving the screen between your various Game Levels.

There are two types of fade effects:

Fade In -creates a transition from the previous screen to a new one.

Fade Out -creates a transition from the current screen into the next Level screen.

Fades will be called automatically when you change levels in the game.


Fade In

A Fade in is used when new level starts. The screen will display the previous level or a solid colour. The screen will dissolve into the new level using a fade effect. The Games Factory provides dozens of fade effects to choose from but it is also possible to create your own transitions.


Fade Out

A Fade Out is used when the current level ends. At the end of the current level, the picture will be gently transformed it into a solid block of colour using a fade effect. There are dozens of fade effects in the GF fades directory.


File Selector

The File Selector provides a standard way of loading or saving games on the disc.


Filters

Filters limit the Event Grid to only those events which affect a specific object.


Fine mode

Fine mode is used by the collision options to test whether two objects are visibly touching. Fine mode is slower than box mode but is more accurate.


Fixed Attributes

Fixed Attributes can not be changed during a game.

Typical examples of fixed attributes include the object’s size, and available directions.


Fixed Menus

Fixed menus appear as a list of titles along the top of the current window. When these titles are selected with the Left Mouse button, a list of the available options will drop down.


Fixed Values

Fixed Values identify an object using a fixed number which is chosen at random when the game is started.


Flags

Flags record the on or off values in the game. Each Active Object can have up to 32 of these values numbered from 0 to 31.


FLI Animation

FLIs are Autodesk compatible Animation files which can be played at any point in your game.


Floating Menus

Floating Menus are displayed directly under the mouse pointer. The Games Factory displays these menus whenever you click on an object or select an event.


Focus

Windows only lets you control a single Edit box at a time. If you have several of these objects on the screen, the users will be able to choose between them by clicking the contents with the mouse. They can then scroll through the list using the arrow keys, or select an option with the mouse.

In technical terms, the currently selected object has the "focus" of the user's attention. You can set this focus in your game using the Get Focus action. This activates the current object and selects it for the user. This object will now be used for all future keyboard commands.


Fonts

Fonts are a set of characters in a given typeface and point size. For example, 10 point Times Roman. Most fonts are available in families that include different weights or styles such as bold and italic.

10 pts 18 pts 36 pts


Frames

A Frame is a single element in an animation or Multimedia sequence:


Frame mode

Frame Mode enables you to control your position in a multimedia sequence using a series of numbered frames as reference points. Each frame is assigned a number starting at 0.

Frame mode works like the "pause" option on a Video recorder and enables you to step though the video frames one shot at a time.


Functions

Functions change the contents of an Alterable Value or the state of an object. They can be accessed via the Retrieve Data from object button in the GF Expression Evaluator.

Examples:

X("Object")

Y("Object")

Random(10)

Value("Object")

Xmouse

Ymouse


.GAM files

".GAM" files store your GF games on the disc.


Game Level

A Game Level holds a series of objects, actions, and events that can be used in your GF game.


Game File Level

A Game file Level launches an entire GF game from the disk. These levels can be used to split your game into simpler, easy to manage sections.

The game that stores the level in its Storyboard is known as the "Parent game" and the level that is loaded is called the "Child game".


GF

A shorthand name for The Games Factory.


Global

The term Global is used for objects or event groups which exist for the duration of a game. These global objects or events can be turned off by an action.


Global Objects

Global Objects exist for the entire game rather than just for one level. Global Objects can be created and destroyed at will. In contrast, Local Objects will be destroyed automatically at the end of each level.


Global Event groups

Global Event groups are collections of events which continue to work for the duration of the game. They can be activated or deactivated using a simple action from the Event Editor.


Global Values

The Games Factory provides you with up to sixteen Global Values, numbered from 1 to 16. These values keep their contents whenever you move between Levels. You can use them as a fast way of transferring information between Storyboard levels.


Gradient Fill Patterns

Gradient Fill Patterns are useful for creating attractive backgrounds for your games. Any Quick Background object can be optionally assigned to a colour gradient. A gradient fill displays a progression between two colours in the colour palette. A gradient fill can be generated from left to right, or top to bottom. The result is a smooth wash of colour which is perfect for skylines or seascapes.


Handy Hints

Handy Hints provide helpful messages which are displayed whenever the mouse over an object or icon. These handy hints can be turned off using a simple option from the Edit/Preferences menu.


Hiscore Objects

Hiscore Objects record the scores of the best players on a disc. These scores can be displayed or changed at any point in your game.


Hot Spot

A Hot Spot indicates the position of an invisible "handle" on an object. This handle is used as the starting point of the object's coordinates, and it can be changed using the Picture Editor.


Icons

Icons are small pictures which can be selected by the mouse to perform an action. There are two basic types of icons

Command Icons

Object Icons.


Icon Editor

The Icon Editor is used to change the appearance of the Icon for any object. The Icon Editor is very similar to the Picture Editor.


Initial direction(s)

The Initial Direction sets the direction(s) an object can move at the start of a game. The available direction(s) may changed as the game progresses.


Joystick 1

Joystick 1 is the joystick plugged into the LEFT joystick port. If only a single Joystick is being used, it must be plugged into the left joystick port.


Joystick 2

Joystick 2 is a Joystick plugged into the RIGHT port. Many computers have only a single joystick port so use this option with care.


Jump Strength

The Jump Strength sets the speed at which a character in a platform game can jump.


Levels

Levels split your game into separate sections, each with its own unique set of challenges. The Games Factory allows you to use as many levels as you like.


Ladder

Ladders are backdrop objects which can be climbed by a player controlled Platform Movement. You can set these ladders up using a simple option from the Obstacle menu for each backdrop object.


Level Grid

The Level Grid divides the play area into a number of rectangular sectors. Each object can now be positioned in units of a single sector.


Level Editor

The Level Editor provides you with everything you need to create a level in your game. You can use the Level Editor to set the position, movement type, and animations of the objects in your game.


Library

A Library is a set of predetermined objects which can be selected at any time from the Level Editor. You can also create your own libraries using a simple menu option.


Library Menu

The Library Menu is a pull down menu on the Toolbar. It can only be used from the Level Editor. Each option represents an entire library of objects which can be loaded into the Object Selector with a single click of the Left mouse button.


Limit Conditions

Limit Conditions control how your events will be tested during your game. Options are provided to repeat your tests, stop after a single check, or restrict selected actions.


Lives Objects

Lives Objects display the number of lives the player has left during the game. You can display the lives as either a simple number, or a complex graphic.


Local

Local refers to objects or event groups limited to the current Game Level.

See: Local Objects, Global Objects


Local Objects

Local Objects only exist for the duration of the level they were created in. These local objects will be destroyed automatically when the level ends.

See: Global Objects


Local Event Groups

Local Event Groups are discarded after the current level.

See: Global Event Groups.


MCI Objects

MCI Objects provide fine control over any multimedia device which understands the official Media Control interface.


Menus

Menus are lists of options which can be selected by clicking on them with the mouse.

See: Fixed Menus, Floating Menus, and Sub Menus.

Each game has its own menu bar. You can define this using the “Change menu” button from the Game Set-up dialogue You can read the user’s selections using the “Has an option been selection?” condition from the Event Editor. It’s listed under the “Special” options.


MIDI

MIDI is a standard format for used for recording professional quality music.


Mod

Mod is a function which returns the remainder of a number after a division.

e.g.

5 mod 2 = 1 (5 = 2*2 + 1 left over)

5 mod 3 = 2 (5 = 3*1 + 2 remaining)


Mouse Controlled

The Mouse Controlled option lets you assign an object to the mouse. The movement of your object can be restricted to a specific screen area if required.


Mouse Zone

Mouse zones are rectangular areas which can be tested for the presence of the mouse pointer.


Movement Selector

The Movement Selector is a dialogue box that can be viewed when the movement option is selected from an object’s pop-up menu.


Mosaic Fill Patterns

Mosaic Fill Patterns generate an effect very similar to Windows wallpaper. Mosaic fill patterns can be used to add texture to a Quick Background object.


MPEG

Motion Picture Expert Group (MPEG) is the latest file format for Multimedia movies.


Multimedia

Multimedia is a standard term for any display which includes music, sound, pictures, or film clips.


Multimedia Device

A Multimedia device is a program or add on which lets you play multimedia effects on a computer.


Multimedia Objects

Multimedia Objects let you add high quality sound and movie clips directly from The Games Factory

Available multimedia objects include:

CD audio Objects -music from a normal CD

AVI Objects -Microsoft Video for Windows

QuickTime Objects -movie files from an Apple Macintosh computer

MCI Objects -Any device which uses the Media Control Interface


Music

Music can be added to your game. It can be played from either a "MIDI" compatible music file, or straight from the audio track of your CD-ROM.


Obstacles

Obstacles are immovable background objects which block another objects progress. Typical obstacles include walls, doors or towers.

See Background Obstacles


Objects

Objects provide the raw materials for your games.

There are many types of objects including:

Active Objects -used for spaceships, balls, or aliens.

Backdrop Objects -provide fixed barriers such as walls.

Counter Objects -hold the numbers used for your calculations.

Lives Objects -indicate the number of remaining lives.

Score Objects -hold the current score.

Question and Answer Objects -ask the player questions.

Button objects generate clickable buttons for control panels

Hiscore Objects -save the best scores achieved in the game.

Multimedia Objects -display movie clips or play music from the CD.

Mixer objects control your MIDI music and sound effects.

Edit box objects display scrolling areas of Text.

Most of these objects can be either Local or Global


Object Bank

The Object Bank contains all the objects used by your current game. The Object bank is updated automatically, and is saved along with your games. It is displayed in a small window near the top of the Level Editor.


Object Group

An Object Group is a collection of objects dedicated to a single purpose. Object groups can be tested and changed using a single icon from the Event Editor.

All the objects in your groups MUST be of the same type.


Object Icons

The Object Icons represent a single object which can be manipulated in your game.


Object Library

An Object Library is a collection of objects stored on the disc and are ready for immediate use in your game. These libraries can be accessed directly from an icon in the Level Editor. You will find the object library to the left of the Playfield.


Object Preferences

The Object Preferences are a series of options which choose how an object will be controlled from The Games Factory.


Object Selector

The Object Selector is a small window near the top of the Level Editor which contains all the objects used by the current game.


Origin

The Origin provides a fixed reference point for all coordinate calculations. It can be moved to a new position using an option from the Preferences box to any point on the game area.


Parent game

A "Parent game" contains a game Level which will launch a separate game from the disc.

The new game is called the "Child game". The "child game" is a separate game with its own set of Storyboard levels, objects, actions, and events. The "child game" is created in The Games Factory using the same method used to create the "parent game", and can be loaded and edited independently from its parent.


Parent Objects

Parent Objects generate new objects during a game.

See: "Child Objects".


Palette

A Palette is an array of colours that can be selected by clicking the mouse button. These colours can be used in any picture or movie in The Games Factory.


Paragraph

A paragraph is a section of text in a Text Object. Each object can have any number of paragraphs only a single paragraph can be displayed at a time. You can move between the paragraphs using a range of actions from the Event Editor.


Password

The Password is an optional phrase or keyword which can jump directly to a selected level in your game.


Path Movement

Path Movements flip an object through a complex movement pattern entered from the screen. Paths can be recorded directly using the mouse, or generated one line at a time from the Path Editor.


Path Editor

The Path Editor allows you to add pre-recorded movement sequences to any Active Object.


Platform Game

Platform games present a sideways view of the world, and pit the player against a range of obstacles on the screen. The player is often trying to reach a treasure or rescue someone or something.


Picture Editor

The Picture Editor is a simple drawing system which allows you to create new objects for your games.


Platform

A Platform is a Backdrop object which has had its Platform option enabled from the Obstacle menu. These objects can be used as the floors of a Platform Game.


Platform Movement

Platform Movement animates a player character along a platform obeying the normal rules of physics, such as gravity.


Platform Objects

Platform Objects can be moved along a platform by the player.


Play Area

The Play Area is the part of the Level Editor screen which is displayed on the screen during the game. The play are is also known as the Playfield.


Player

The Player is a general term for the user of your productions.


Player number

The Player Number assigns an object to a selected player. The Players are numbered from 1 to 4. You can select a player to an Active or Multimedia object using the Moved By option from its Movement menu. You can choose one for a Lives or Score Object using the Player menu.


Player Actions

Play actions are any action which can performed by the player, such as hitting a key, moving the joystick, or answering a question.


Player Controlled Movements

Player Controlled Movements assign an object to a player.

See also Mouse Movement, Eight Direction Movement, Race car Movement, and Platform Movement.


Playfield

The Playfield is another term for the play area. It is part of the screen used for your game.


Playlist

A list of MIDI Music tracks used to accompany an FLI or Picture Level from the Storyboard.


Pop-Up menu

A Pop-Up menu pops on the screen when you double click an object or click an object with the right mouse button.

Here’s an example:


Preferences

Preferences set up the GF system the way you like it. You can call up the Preferences options from the Edit menu in the Level Editor.


Question and Answer Objects

Question and Answer Objects are used to display a multiple choice question on the screen and wait for the players response. It is then possible to test whether the answer selected is correct and perform an appropriate action.


Quick Backdrop Objects

Quick Backdrops provide the background areas of your game. They are filled with a selected colour pattern which can be chosen from the Level Editor.


QuickTime Objects

QuickTime Objects play QuickTime for Windows movie files from a game. You will need a special device driver in order to use QuickTime objects.


Race-car Movements

Race-car Movements simulate the movement of real cars in your game. You can steer them, step on the gas pedal, or hit the brakes, just like a real car.


Radio Buttons

Radio Buttons are used to set a single option from a number of possible alternatives. Radio Buttons are arranged in groups of items, and only a single button can be selected from each group. Click the radio button to enable or disable it.

The following is an example of a group of radio buttons.


Rebound Game

Rebound games include Pinball type games in which a player has to use a bouncing ball to hit selected targets.


Resize box

A Resize box is provided with eight rectangular control points which allows you to change the size of any object in your game.


RGB Slider

The RGB slider is a series of three slider bars which allow you to set the precise shade of a colour. They are only displayed if you are running The Games Factory in 16 bit or 24 bit colour mode.


Run Menu

The Run Menu is automatically displayed when you play a game.


Storyboard Controls

The Storyboard Controls are special actions which let you move to a new level, or exit from your game.


Score Objects

Score Objects keep track of the player's score, and display it on the screen using the selected font.


Screen Savers

Screen Savers are Windows programs which automatically run if you leave the computer unused for several minutes. They can be generated using a simple option from the File menu.


Scrolling

Scrolling is the process of shifting an extra large playing area through the visible screen window.


Soundcard

Soundcards are optional extras which add sound and music to your computer. The Games Factory is compatible with all major brands.


Sound Samples

Sound Samples are pieces of real sound which can be played back throughout your game. The Games Factory comes with a wide range of samples ready for use but if you have a sound card, you can create your own samples.


Sound Actions

Sound actions generate a sound effect through your sound card.


Sound Driver

Sound Drivers are special programs that come with your sound card. These sound drivers set up the sound card so that it can be used by the computer programs.


Stand-alone Game

Stand-alone games are completely independent of The Games Factory. They can be run on any Windows computer without needing a copy of The Games Factory


Static Objects

Static Objects are used for things like bricks or walls, which never move from their original position. If you want a static object to interact with the rest of the game, you can define it as an Active Object, and fix it into place using a simple menu option.


Step Through Editor

The Step Through Editor tests your game and lets you add in new features. It can be accessed directly from the Level Editor using a simple icon.


Storyboard

A Storyboard is a list of the levels and screen animations which make up the complete game.


Storyboard Editor

The Storyboard Editor lets you add, delete, and move the individual levels in your game.


Storyboard Level

A Storyboard Level holds a single section of your game.

Each level can include either GF objects, a still picture, an "FLI Animation", or an entire GF game.


String

A series of letters or characters surrounded by double quotes:

"This is a string"

You can read a string from an object, convert them from a number using Val, or even enter them from the keyboard using an Edit box object.


Sub-menus

Sub-menus appear when the item you have selected has several possible options. If a sub-menu is assigned to an item, you will see a > character to the right of the text.


Text Objects

Text Objects display messages in any TrueType Font. Text objects are grate for use in title screens.


Timer

The Timer is a built-in clock that runs throughout your game. The timer starts at zero and increases by one every thousandth of a second.


Time Mode

Time Mode records your position as a time interval. The time starts at zero and is measured in units of a thousandth of a second.

See Frame mode


Toolbar

The Toolbar provides a series of command icons for the  Games Factory . Each icon can be selected with the mouse to perform an appropriate action.


Track

Tracks store information on the CD or disc. There are several different kinds:

CD audio tracks hold some digitized CD music.

QuickTIme tracks store Video, Sound, MIDI Music, Text, or MPEG movies.


Values

Values store numbers in your games. Any Active Object can have up to four values assigned to it. The first three values are indicated by the letters A, B, and C respectively. The final value is fixed at random when you define the object. These values can be any whole number from approximately -2000,000,000 to +2000,000,000. Fractions are NOT allowed.

See: Alterable Values, Counter Objects, Flags, and Scores.


Video for Windows

Video for Windows is a device driver distributed by Microsoft. It is required for displaying "AVI" movie clips.


Video for Windows Objects

Video for Windows Objects play "AVI" movie files from your games.


WinG

WinG is an exciting new Animation system for Windows which speeds up the performance of many games.


X coordinates

An X coordinate gives the horizontal distance of an object from a fixed reference point called the origin. Positive values indicate a distance to the right of the origin, and negative values represent a distance to the left.


Y coordinates

A Y-coordinate enters the vertical distance of an object from a fixed reference point called the origin. Positive values indicate a distance below the origin, and negative values represent a distance above it.


Zones

Zones are rectangular areas of the screen used for detection purposes.


Hiscore object Actions

These actions provide you with the following options:

Ask for a player's name

Reset

Change one name

Change one score

Position / Select Position

Position / Set Horizontal Position

Position / Set Vertical Position

Visibility / Make object invisible

Visibility / Make object reappear

Destroy


Ask for a players name

Ask for a player’s name tests the selected player’s score against the values held in the Hiscore table. If it’s greater than one of the existing scores, the new score will be added to the appropriate point in the table, and the player will be asked to enter his or her name into the following dialog box:

All the scores below it will move down one, and the score which was previously at the bottom will disappear completely. If the score is not high enough, nothing will happen.

When you define this action, you’ll be asked to choose a player number from 1 to 4. Click a button to make your choice. Each Lives and Score object in your game has its own Player number. You can assign these numbers using the Player options from the object’s pop up menu. The objects default to player 1, so you’ll need to set this separately from the Level Editor.

You can also assign each player to one of the Player controlled movement options used by Active objects. These are set-up in the Level Editor. Click the object with the right mouse button, and choose Select Movement from the pop-up menu. Once you’ve chosen the movement method, you can then enter the player number using the Moved by option.


Reset

The Reset action erases any new scores, and resets the Hiscore table to the values you entered in the Scores Setup dialog box in the Level Editor.


Change one name

The Change one name action enables you to enter a new name in the Hiscore table.

First, enter the new name and then enter the new score.

The position numbers start at 1 (the top of the list) and increase as you move down.

Enter the position number to change The scroll bars in the Expression Evaluator generate numbers from 0 to the maximum number permitted by The Games Factory. The scroll bar will increase the value by massive amounts, and is usually slower than typing the value in from the keyboard. Once you’ve entered the position number, you’ll be ask to enter the player’s new name.

Type the text between the “quotes”.


Change one score

The Change one score action enables you to enter a new score value in the Hiscore table. Before entering this new score, you’ll be asked to select the position in the hiscore list you wish to change.

The hiscore table is composed of a number of entries, starting at the number 1 at the top of the list. Enter the position number to change. The scroll bars in the Expression Evaluator generate numbers from 0 to the maximum number permitted by The Games Factory. The scroll bar will increase the value by massive amounts, and is usually slower than typing the value in from the keyboard.

After you’ve entered the position to change, type the new score into the following dialog box:


Position

The Position menu lets you move your Hiscore object around the screen. There are three possible actions:

Set position moves the object to either a fixed screen position, or directly over a target object on the screen.

Set horizontal position moves the object left or right across.

Set vertical position moves the object box up or down.

Note: All coordinates are measured from the top left corner of the Hiscore object.


Set position

Set position lets you either position your object at specific coordinates, or move it over another object on the display. Use the dialog box to enter the new position of the object on the screen. If you want to place your object over a fixed screen coordinate, click the X and Y boxes and enter your values. The coordinates will be measured from the top left corner of the box.

You can also drag the "cross-hair" with the left mouse button. If you'd like to read the position from another object, enable the Relative to button and choose the object from the selector. The Relative to feature provides a useful way of controlling the position of the box on the screen. Create an active object, and assign it to a movement system such as "Mouse" or "Eight-direction". It's a good idea to make the active object invisible using the Make object Invisible action at the start of your frame. You can now move your box by calling the Set position action at regular intervals in your game. The box will follow the movement of the Active object.

See:

Set horizontal position

Set vertical position


Set horizontal position

Set horizontal position moves your object horizontally across the screen. When you're defining this action, you'll be asked to enter a new X coordinate for your Hiscore object. This coordinate is measured from the left of the game window to the left of your box. Enter the coordinate either directly into the dialog box or click the Edit button to read the value using a function.

Here are a few ideas:

Take the new X coordinate from the mouse coordinates using the XMouse function.

Move the Hiscore object to the left using the X Position of hiscore table function: Hiscore X Pos("Hi-score")-1 where "Hi-score" is the name of your object.


Set vertical position

Set horizontal position moves your object horizontally up or down on the screen. When you're defining this action, you'll be asked to enter a new Y coordinate for your Hiscore object. This coordinate is measured from the top of the game window to the top of your box. Enter the coordinate either directly into the dialog box or click the Edit button to read the value using a function.

Here are a few ideas:

Take the new Y coordinate from the mouse coordinates using the YMouse function.

Move the object up using the Y Position of hiscore table function: Hiscore Y Pos("Hi-score")-1 where "Hi-score" is the name of your object.

Move the object down using the expression: Hiscore Y Pos("Hi-score")+1.


Visibility

This lets you hide the scores away in the background, and show it as needed.

There are two possible actions:

Make object invisible

Make object reappear


Make object invisible

The Make object invisible action removes the Hiscore table from the screen. You can display it again with using the Make object reappear action.


Make object reappear

The Make object reappear action displays the Hiscore table at the previous position. It is used to return the table to the screen after a Make object invisible action.


Destroy

The Destroy action eliminates the hiscore table from the game, and removes it from the screen.


Hiscore object Conditions

There are two conditions available for Hiscore objects:

Has a player a Hiscore

Is Visible?


Has player a Hiscore?

This condition compares the player’s score against the contents of the Hiscore table. You can this condition to display an appropriate message depending on the player’s performance.


Is Visible?

Is Visible? will be True if the Hiscore object is currently being displayed on the screen. You can conceal the Hiscore objects by enabling the Hide on Start check box in the Setup dialog box or by using the Make object Invisible action from your game. You can display the object again with the Make object Reappear action.


Hiscore object Functions

The Games Factory lets you read the hiscore table directly from your games, using the following functions:

Hiscore value	Hiscore(“object”,slot)

Hiscore name	Hiscore name$(”object”,slot)

X Position of Hiscore table	Hiscore X pos("object")

Y Position of hiscore table	Hiscore Y pos("object")

slot is the position you wish to read. The positions start at 1 (top) and increase as you move down through the table.


Hiscore value

Usage: Hiscore(“object”,slot)

This function reads the score at the selected position. Enter the position number that you would like to read. The position numbers start at 1 (top) and increase as you move down through the table.


Hiscore name

Usage: Hiscore name$(”object”,slot)

This function reads the name of the player at the selected position. Enter the position number that you would like to read. The position numbers start at 1 (top) and increase as you move down through the table.


X Position of Hiscore table

Usage: Hiscore X pos("object")

This function reads the horizontal position of the Hiscore table on the screen. It gives you an X coordinate measured from the left of the game window to the left of the current box.


Y Position of hiscore table

Usage: Hiscore Y pos("object")

This function reads the vertical position of the Hiscore table on the screen. It gives you an Y coordinate measured from the left of the game window to the left of the current box.


INI object Actions

You can read or change the values in an INI File at any time in your game. In the Event Editor, click a Grid Box under the INI icon with the right mouse button to display a pop-up menu with the following options:

Set Current File

Set Current Group

Set Current Item

Set Value

Set String

Save Position of object

Load Position of object

Destroy


Set Current File

Set Current File chooses a new INI File to be used for all future operations. If the File doesn’t exist, it will be created automatically on the disc. The default directory will be your current Windows folder.


Set Current Group

Set Current Group chooses the Group you wish to manipulate. You should enter the name between the quotation marks. You don’t need to include the square brackets. If the Group doesn’t exist, it will be added to the end of the currently open INI File.


Set Current Item

Set Current Item selects the item you want to read or adjust. Enter the name between the brackets. If the item doesn’t exist, it will be added to the end of the currently selected Group.


Set Value

Set Value saves a number in the currently chosen Group and Item.

For example:

Set Current Group to “test”

Will move to the Group [test]

Set Current Item to “first_value”

Will go to the Item called first_value

Set Item value to 3

Will produce “first_value=3”

The text lines would look like this:

[test]

first_value=3


Set String

Set String saves a line of text into the previously chosen Group and Item.

Before using this feature, you should pick the Group with Set Current Group.

You can now choose an Item you’d like to change with Set Current Item.

Finally, you can enter the text with the Set String action. For example,

Set string value to “Hi There”

Supposing you wanted to set Item “name” in Group “[User]” to “Stephen”

You’d use the actions:

Set Current Group to “user”

Set Current Item to “name”

Set string value to “Stephen”

The resulting File would look like this:

[user]

name=Stephen


Save Position of object

Save Position of object stores the current coordinates of an object in the current Group. You’ll be asked to choose the object as you are entering the action. You don’t need to bother with the “Item name”, as it’s set up automatically. The Games Factory will generate it by adding “pos.” to the object name.

For example,

Save position of “Ball”

would produce a line like:

pos.Ball=320,200


Load Position of object

Load Position of object copies a saved object position from the INI File and moves the object to the stored coordinates.

You’ll be asked to choose an object to be loaded when you enter this action. This object should have the same name as an object you’ve previously saved in the "INI” File.


Destroy

Destroy turns off the INI object, and deactivates it from your game.


INI object Functions

You can read the contents of an INI File directly from your game with the Get Value and Get String functions.


Get Value

Usage: Value of(“object”)

Reads a value from the current position. You’ll need to choose the [Group] and Item first.

See:

Set current Group

Set current Item


Get String

Usage: String of$(“object”)

Reads a line of text from the current File position. You can move to the appropriate line with the Set Current Group and Set Current Item actions.


Entering a Time Interval

Entering a Time Interval lets you choose a time interval from the screen. A time interval consists of boxes representing the minutes, hours, seconds, and hundredths of seconds. Click the "unit boxes" to select the box.

Enter a new value by typing in a value from the keyboard or use the slider to select a value. Dragging the slider left decreases the current value and dragging it to the right increases it.

After you've set your time interval, click OK to accept it, or press Cancel to abort.


Setting up a screen zone

Screen zones represent an area of the screen. The screen zone is displayed as a large rectangle with resizing handles.

If you know the dimensions of the screen, you can enter the size directly into the dialog box. The Horizontal boxes set the X coordinates of the left and right-hand sides of the zone. The Vertical boxes enter Y coordinates of the top and bottom edges of the zone.

To enter a new value, click the X or Y box and type in your new value from the keyboard. As you make changes, you’ll see the zone resize itself in the screen.

Click OK to accept your zone size.

Alternatively, you can drag the zone shape by clicking the mouse button.

If you click inside the zone, the mouse pointer will change to a:

Hold down the left mouse button and drag the mouse to move the zone to a new position.

If you click one of the resizing handles around the edges of the zone, the mouse pointer will change to a double arrow:

Hold down the left button to drag the mouse to move the edge in the desired direction. Release the mouse button to accept the new size.


Choosing an object

The objects are displayed in a dialog box on the screen. You can choose an object by clicking its icon.

If you don’t see the object you want, pick a different object from a library or another The Games Factory game.


This level

The This Level button is selected as the default. It lets you choose an object from the current game. You can move between the levels using the < or > buttons.


Other games

Click Other Game to choose an object from another GF file. Use the Directories box to find the file you want to use and enter the File Name in the appropriate box.


A Library

Click A Library button provides a menu of the installed object libraries. You can select these libraries with the mouse to display their objects in the dialog box.

Once you've chosen your object, you'll need to position it on the screen. Click OK to enter the starting point. There are two possibilities:

At actual coordinates

The simplest option is to read the location from a fixed screen location. You can type the new coordinates into the X and Y boxes.

Alternatively, you can position the object directly from the screen by dragging a "cross-hair" ( [image]) with the mouse.

Relative to

Enable the Relative To button to place the new object near an existing object. The coordinates can be taken from any object on the playfield. You’ll be asked to choose the object from a selector. You can set the position using the following options:

The coordinates can start from the source objects Hot Spot or Action point.

You can place you object from a User defined point or In the direction of the source.

The object’s orientation can be either Normal or In the same direction as the source.


Choosing some music

You can choose your music using a selector:

The File Name box shows the list of the available files. The Games Factory can read files in three different formats:

MID and RMI files are used to store standard MIDI music.

.GAM files store the music from a particular game.

Choosing the file type

Click the Choose from box to choose the file type. Midi enters your music from a midi file in ".MID" or “RMI” format.

Other Games loads some music from another GF file.

This Game loads some music from another Level.

Selecting the music

Click a filename to choose the file. If you’ve chosen a GF game file, the Sounds area will display a list of the available music tracks. If there are several, click the one you want to load.

After you’ve chosen the music, you can listen to the file by clicking the Play button.

Click OK to accept your selection. Click Cancel to abort.


MCI object Actions

MCI objects give you a general way of controlling a device or animation system from within The Games Factory. You'll be able to use these devices directly from your games providing you've installed an appropriate driver from the Windows Control panel. The available actions are:

Send a command

Destroy

You can enter your commands using the standard the “MCI” instruction set. In order to communicate with the MCI device, you’ll need to obey a few simple rules.

Each line should be entered into a separate Send a command action from the MCI object’s action menu.

You’ll also need to define the appropriate MCI objects in the Level Editor, and enter the device names into the box provided.


Send a command

Send a command will send the chosen command string to your device. The string tells your device what to do using a simple language.

Note: Enter the command in lower-case letters only.

The general format is:

command effect info

You can choose the command from literally hundreds of possibilities. You can enter the command in upper or lower case letters. The full list of commands can be obtained from Microsoft, or via an on-line service such as CompuServe.

The effect will be the name of the file or object you are controlling. The format depends on the device. If you’re manipulating a QuickTime file, or Sound sample, it will be a file name containing your effect. If you were controlling a CD audio player, it could be the track number. If you were playing a sequencer, it could be the name of an instrument.

In each case, the name is typed exactly as it appears, without the need for additional quotation marks. Effect names can be things like:

“PLAY C:\TEST.WAV”

info provides the command with some additional information. It might be a value such as the track number, or a string of characters such as on or off.

Most MCI devices follow a standard pattern. You first set them up with an Open command, and then you can start entering your instructions. Normally, The Games Factory will automatically perform an Open instruction at the beginning of your frame, and a Close instruction at the end so you don’t need to worry about these commands. To stop The Games Factory from performing these instructions, disable the Open MCI Device Drive at Start of frame, and Close MCI Device Drive at end of frame check boxes in the Setup dialog box.

Once you’ve turned a device on, use Play to start the device running, and Stop. to turn it off. After you’ve finished, it’s important to release the device with a Close command. As a rule, The Games Factory will close the device for you at the end of each frame.

Example

Lets start by taking control of the Waveplayer device.

1) In the Level Editor, click the Create New Object icon

2) Click the Multimedia tab of the Create New Object dialog box.

3) Click the MCI icon

 .

4) In the Setup MCI object dialog box, type mciwave in the Device name box.

5) In the Event Editor, click a Grid box under the MCI Object icon with the right mouse button.

6) Choose Send a command from the pop-up menu.

7) In the Send a Command dialog box, enter the following string between the quotation marks: PLAY D:\SAMPLES\BELLS\ALARM2.WAV. This string will play a sample called “ALARM2.WAV” from the CD. You could replace this name with your own sample from the disc.

8) Click OK

If you need to perform several commands on a single MCI object, you can simplify things by using an Alias command. This is just a short form name for the “effect” of the command.

The following is an example of an Alias command:

“OPEN D:\SAMPLES\BELLS\ALARM2.WAV ALIAS TEST”

“PLAY TEST”

In the above example, you are substituting the word TEST for the string “D:\SAMPLES\BELLS\ALARM2.WAV”.

If you wanted to stop the sample playing, you’d use STOP TEST. If you wanted to close down the Waveplayer device, you could enter CLOSE TEST.

Here’s another example which controls a sequencer device:

“OPEN D:\MIDI\ASTRO.MID ALIAS FANFARE”

“PLAY FANFARE”

“STOP FANFARE”

“CLOSE FANFARE”

You may have noticed that some of these MCI commands include the actual locations of files. This may cause problems if the user runs your game from a different drive or directory.

You can avoid this problem by using macros. For example:

“OPEN D:\MIDI\ASTRO.MID ALIAS FANFARE”

The above line will only work if the software was run from drive "D:". If it was run from “E:”, absolutely nothing would happen, as the device would be unable to find the file.

You could fix this using the following macros:

%device% represents the current device or drive being used

%dir% represents the game’s home directory.

We can use these options to re-write the previous command as follows:

“OPEN %device%%dir%ASTRO.MID ALIAS YAHOO”

Providing you entered the string correctly, the MCI system would read “ASTRO.MID ” straight from the game’s current directory, no matter where it was actually located.

Note: These macros can only be used with MCI Objects, and are only appropriate when finding file names.


MCI Commands

Here's a list of the most useful commands: (See the individual command sections for a brief explanation of how each command works).

close

configure

load

open

pause

play

resume

set

door open

door closed

speed factor value

time format frames

time format milliseconds

setaudio

left volume to value

right volume to value

left on/off

right on/off

status

step

by frames value

reverse

stop

update


Close

The Close command closes the device when you've finished with it. You can call this automatically using an option from your object's preferences setting.


Configure

The Configure command displays an optional configuration box which allows you to setup the device from the screen. The appearance of the controls and the values that you can change will depend on the device.


Load

The Load command loads a new file into your game.


Open

The Open command prepares the device for playing.


Pause

The Pause command freezes the current activity in its tracks.


Play

The Play command plays the media according to your chosen settings.

You can insert the following info lines after this command.

from pos value plays from a selected position that is entered by a value.

repeat loops the playback continuously.

reverse plays the media backwards!

to pos value plays from the current position to the location you entered in the value.


Resume

The Resume command restarts a paused activity.


Set

The Set command sets an option on the device.


Door open

The Door Open command opens the door of the CD drive (only for CD audio).


Door closed

The Door Closed command closes the door of the CD drive (only for CD audio).


Speed factor value

The Speed Factor value increases the playback speed by the selected value.


Time format frames

Time Format frames measures the position in frames.


Time format milliseconds

Time Format Milliseconds measures the position in milliseconds.


Setaudio

Setaudio sets the audio track, or a sound effect.


Left volume to value

Left Volume to value sets the volume of the left stereo channel.


Right volume to value

Right volume to value sets the value of the right stereo channel.


Left on/off

Left on turns the left channel on.

Left off switches the left channel off.


Right on/off

Right on turns the right channel on.

Right off turns the right channel off.


Status

Status reads the status of the device.


Step

Step moves through an animation a frame at a time.


By frames value

By frames value plays the selected number of frames.


Reverse

Reverse steps backwards through the clip.


Stop

The Stop command stops the playback at the current position.


Update

Update redraws a video window.


Destroy

The Destroy action turns the selected MCI object off for the duration of your game. Any attempt to access it will be ignored.


MCI object Conditions

Conditions provide general control over an MCI object. The effects depend on the most recent command you've entered into the device.

You can obtain the full set of MCI commands from either Microsoft, or the Multimedia section of your favorite on-line service.

These are the available conditions for an MCI object:

Compare to returned number

Compare to returned string


Compare to returned number

Compare to returned number reads the value returned by a previously called MCI command, and compares it to a number entered from the keyboard.

You can use this command to test the position and status of a video sequence or the duration of a sound clip.


Compare to returned string

Compare to returned string reads some text from the last MCI command, and allows you to test it against your chosen characters.


MCI object Functions

These functions test the status of any MCI object in your games. The options may seem rather limited, but each one can be used to generate a range of different information. The available functions are:

Return Value

Return String

Last error number


Return value

The Return value function returns the result of the last MCI operation called from your game. The value depends on the type of command you've called. In a CD audio object, you could read the total playing time or the number of tracks. In a AVI, you could read the current frame.

See:

Typical commands


Typical commands

The command can be one of the following:

ready

left/right volume output

current track

disk space drive

forward

length

length track number

media present

number of tracks

pause mode

position

position track number

speed

start position

time format

window visible


Return String

Return String reads a string of characters from the selected MCI device. This string might represent anything from the current filename, to the name of an instrument.


Last error number

Last error number reads the last error number generated by the MCI device. A value of zero means that there are no errors. Any other number indicates a problem.


Mixer object Functions

The available Mixer object functions are:

Wave volume	Wave vol("Object")

Wave left volume	Wave left vol("Object")

Wave right volume	Wave right vol("Object")

Midi FM synthesizer volume	FM vol("Object")

Midi FM synthesizer left volume	FM vol left("Object")

Midi FM synthesizer right volume	FM vol right("Object").

Midi square wave synthesizer volume	SQ vol("Object")

Midi square wave synthesizer left volume	SQ vol left("Object")

Midi square wave synthesizer right volume 	SQ vol right("Object")

In each case, the volume settings range from 0 (low) to 100 high (high).


Wave volume

Usage: Wave vol("Object")

This function reads a value from 0 to 100 representing the volume of your sampled sound effects. If you're using Stereo samples, the value will be worked out as the average of the left and right sound volume settings.

You can call this function using the Change Wave volume action to adjust the sound level continuously or display the volume as a level meter using a Counter object.

See:

Change Wave volume

Wave left volume

Wave right volume


Wave left volume

Usage: Wave left vol("Object")

This function reads the volume of the left channel of a stereo sound sample. The value ranges from 0 (low) to 100 (high).

You can call this function using the Change Wave left volume and Change Wave right volume actions to sweep the sound from left to right or display the volume lever as a number bar using a Counter object.

See:

Change Wave volume

Wave volume

Wave right volume


Wave right volume

Usage: Wave right vol("Object")

This function reads the intensity of the right channel of a stereo sound sample. The value ranges from 0 (low) to 100 (high).

You can call this function using the Change Wave left volume and Change Wave right volume actions to sweep the sound from left to right or display the volume level as a number bar using a Counter object.

See:

Change Wave volume

Wave volume

Wave left volume


Midi FM synthesizer volume

Usage: FM vol("Object")

This function reads a value from 0 to 100 representing the current volume of your FM synthesized MIDI music. If you're using Stereo sounds the value will be the average of the left and right sound channels.

You can call this function using the Change FM synthesizer volume action to adjust the sound level continuously. You can also copy the value into a Counter object to display the sound lever as a it as a dial or VU meter.

See:

Change FM synthesizer volume

MIDI FM synthesizer left volume

MIDI FM synthesizer right volume


Midi FM synthesizer left volume

Usage: FM vol left("Object")

This function reads the volume of the left channel of some FM synthesized MIDI music. The result ranges from 0 (low) to 100 (high).

You can call this function using the Change FM synthesizer left volume and Change FM synthesizer right volume actions to create balance controls on the screen or display the sound level in a Counter object to generate attractive VU meters or disco effects.

See:

Change FM synthesizer  volume

MIDI FM synthesizer volume

MIDI FM synthesizer right volume"


Midi FM synthesizer right volume

Usage: FM vol right("Object").

This function reads the volume of the right channel of some FM synthesized MIDI music. The result ranges from 0 (low) to 100 (high).

You can call this function using the Change FM synthesizer left volume and Change FM synthesizer right volume actions to create balance controls on the screen or display the sound level in a Counter object to generate attractive VU meters or disco effects.

See:

Change FM synthesizer  volume

MIDI FM synthesizer volume

MIDI FM synthesizer left volume


Midi square wave synthesizer volume

Usage: SQ vol("Object")

This function reads the volume setting from the square wave synthesizer used by some MIDI music cards. It's not available from most sound systems. The result ranges from 0 (low) to 100 (high).

You can call this function using the Change square wave synthesizer volume to adjust the sound level continuously. You can also display the Counter object to display it as needed.

See:

Change Square wave synthesizer volume

MIDI Square wave synthesizer left volume

MIDI Square wave synthesizer right volume


Midi square wave synthesizer left volume

Usage: SQ vol left("Object")

This function reads the volume setting from left channel of a square wave MIDI synthesizer. This feature is only supported by some soundcards. The result ranges from 0 (low) to 100 (high).

See:

Change square wave synthesizer  volume

MIDI square wave synthesizer volume

MIDI square wave synthesizer right volume


Midi square wave synthesizer right volume

Usage: SQ vol right("Object")

This function reads the volume setting from right channel of a square wave MIDI synthesizer. This feature is only supported by certain soundcards. The result ranges from 0 (low) to 100 (high).

See:

Change square wave synthesizer volume

MIDI square wave synthesizer volume

MIDI square wave synthesizer left volume


Mixer object Actions

All Mixer actions work in the same general way. You can set the sound effect's volume using a value from 0 (quiet) to 100 (loud).

Note: If you enter anything value outside this range, the volume will be pushed to the maximum level of 100!

Here's a list of the available actions for a Mixer object:

Change wave volume

Change wave left volume

Change wave right volume

Change FM synthesizer volume

Change FM synthesizer left volume

Change FM synthesizer right volume

Change square wave synthesizer volume

Change square wave synthesizer left volume

Change square wave synthesizer right volume

Destroy


Change wave volume

Change wave volume adjusts the volume used by your Sound samples and Wave effects. The volume settings range from 0 (low) to 100 (high).

Note: If you enter a value less than 0 or higher than 100, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change Wave Volume action. This lets you increase or decrease the volume from the current settings.

If you want to increase the volume, use the function: "Wave vol("Mixer")+1".

If you wanted to reduce the volume, use: "Wave vol("Mixer")-1".

You could assign these options to a series of control buttons on the screen or change them at regular intervals to adjust the volume over a period of time.

Here are a few tips:

1)	Don't let the volume drop below zero. If you do, the volume will immediately jump to the maximum value of 100.

2)	If you're adjusting the volume gradually, add an Every condition to your Events to trigger each change separately. The Games Factory is extremely fast, and could easily complete the whole sequence in a fraction of a second. You'll need to slow down the game in order to hear the effect!

See:

Change wave left volume

Change Wave right volume

Wave volume

Wave left volume

Wave right volume


Change wave left volume

Change wave left volume adjusts the volume of the left channel of a stereo sound sample. The available values range from 0 (low) to 100 (high).

Note: If you enter a value outside this range, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change wave volume left action. This lets you increase or decrease the volume from the current settings.

To increase the volume, use the function: "Wave left vol("Mixer")+1".

To reduce the volume, use: "Wave left vol("Mixer")-1".

Use the Change wave volume left action with the Change wave volume right action to make the sound seem to move around the user's room.

Here's an example that repeatedly fades a sound from left to right:

1)	In the Level Editor, Create a Mixer object and place it on the playfield.

2)	In the Event Editor, click the New Condition line.

3)	Double click the Timer icon and choose Every from the pop-up menu.

4)	Enter a delay of 1 second into the dialog box.

5)	Click OK to accept the delay.

6)	Click the grid box corresponding to the Every action and the Mixer object with the right mouse button.

7)	Choose Change Wave left volume from the pop-up menu.

8)	Enter the following function into the expression to calculate box: Wave vol left("Mixer")+1.

9)	Click OK to accept the function.

10)	Click the grid box corresponding to the Every action and the Mixer object with the right mouse button again.

11)	Choose Change Wave right volume from the pop-up menu.

12)	Enter the following function into the expression to calculate box: Wave vol right("Mixer")-1.

13)	Click OK to accept the function.

You could expand this procedure by adding additional conditions to your Event. These might trigger the sound effect after a counter has reached a selected value, or stop the actions after the fade is complete.

See:

Change wave volume

Change Wave right volume

Wave volume

Wave left volume

Wave right volume


Change wave right volume

Change wave right volume adjusts the volume of the right channel of a stereo sound sample. The available values range from 0 (low) to 100 (high).

Note: If you enter a value outside this range, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change Wave right Volume action. This lets you increase or decrease the volume from the current settings.

To increase the volume, use the function: "Wave right vol("Mixer")+1".

To reduce the volume, use: "Wave right vol("Mixer")-1".

Use the Change wave right volume action with Change wave left volume to generate 3D sound effects.

Here's an example which repeatedly sweeps a sound from right to left:

1)	In the Level Editor, Create a Mixer object and place it on the playfield.

2)	In the Event Editor, click the New Condition line.

3)	Double click the Timer icon and choose Every from the pop-up menu.

4)	Enter a delay of 1 second into the dialog box.

5)	Click OK to accept the delay.

6)	Click the grid box corresponding to the Every action and the Mixer object with the right mouse button.

7)	Choose Change Wave right volume from the pop-up menu.

8)	Enter the following function into the expression to calculate box: Wave vol right("Mixer")+1.

9)	Click OK to accept the function.

10)	Click the grid box corresponding to the Every action and the Mixer object with the right mouse button again.

11)	Choose Change Wave left volume from the pop-up menu.

12)	Enter the following function into the expression to calculate box: Wave vol left("Mixer")-1.

13)	Click OK to accept the function.

See:

Change wave volume

Change Wave left volume

Wave volume

Wave left volume

Wave right volume


Change FM synthesizer volume

Change FM synthesizer volume sets the general volume of your FM synthesized MIDI music. The volume ranges from 0 (low) to 100 (high).

Note: If you enter a value outside this range, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change FM synthesizer Volume action. This lets you increase or decrease the sound level from the current settings.

To increase the volume, use the function: "FM vol("Mixer")+1".

To reduce the volume, use: "FM vol("Mixer")-1".

You could assign these actions to a series of control buttons on the screen or change them at regular intervals to adjust the volume gradually.

Here are a few tips:

1)	Make sure the volume doesn't drop below zero. If it does, the volume will immediately spring back to the maximum setting.

2)	If you're adjusting the volume directly, use an Every condition to your Events to trigger each change separately. This lets you slow down the effect so you can actually hear it. If you omit this condition, the volume will change too fast to notice.

See:

Change FM synthesizer left volume

Change FM synthesizer right volume

Midi FM synthesizer volume

Midi FM synthesizer left volume

Midi FM synthesizer right volume


Change FM synthesizer left volume

Change FM synthesizer left volume adjusts the volume of the left channel of some FM synthesized music. You can set the sound level between 0 (low) to 100 (high).

Note: If you enter a value outside this range, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change FM synthesizer left Volume action. This lets you increase or decrease the sound level from the current settings.

To increase the volume, use the function: "FM left vol("Mixer")+1".

To reduce the volume, use: "FM left vol("Mixer")-1".

You could assign these actions to a series of control buttons on the screen or change them at regular intervals to adjust the volume gradually. You can also use Change FM synthesizer left volume with the Change FM synthesizer right volume action to add a balance control to your game.

Here's an example which turns the balance control to the left. It works by increasing the music's left channel while reducing the volume of the right one.

1)	In the Level Editor, Create a Mixer object and place it on the playfield.

2)	In the Event Editor, click the New Condition line.

3)	Double click the Timer icon and choose Every from the pop-up menu.

4)	Enter a delay of 1 second into the dialog box.

5)	Click OK to accept the delay.

6)	Click the grid box corresponding to the Every action and the Mixer object with the right mouse button.

7)	Choose Change FM synthesizer left volume from the pop-up menu.

8)	Enter the following function into the expression to calculate box: "FM vol left("Mixer")+1".

9)	Click OK to accept the function.

10)	Click the grid box corresponding to the Every action and the Mixer object with the right mouse button again.

11)	Choose Change FM synthesizer right volume from the pop-up menu.

12)	Enter the following function into the expression to calculate box: "FM vol right("Mixer")-1".

13)	Click OK to accept the function.

Note: The "1" in the function statements, sets the size of the volume change. You could increase the number to adjust the balance in larger steps.

You could now assign these actions to a Active object or a Button, and change the balance directly on the screen.

See:

Change FM synthesizer volume

Change FM synthesizer right volume

Midi FM synthesizer volume

Midi FM synthesizer left volume

Midi FM synthesizer right volume


Change FM synthesizer right volume

Change FM synthesizer left volume adjusts the volume of the left channel of some FM synthesized music. You can set the sound level between 0 (low) to 100 (high).

Note: If you enter a value outside this range, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change FM synthesizer right Volume action. This lets you increase or decrease the sound level from the current settings.

To increase the volume, use the function: "FM right vol("Mixer")+1".

To reduce the volume, use: "FM right vol("Mixer")-1".

You could assign these actions to a series of control buttons on the screen or change them at regular intervals to adjust the volume gradually. You can also use Change FM synthesizer right volume with the Change FM synthesizer left volume action to add a balance control to your game.

Here's an example which turns the balance control to the right. It reduces the music's left channel while increasing the volume of the right channel.

1)	In the Level Editor, Create a Mixer object and place it on the playfield.

2)	In the Event Editor, click the New Condition line.

3)	Double click the Timer icon and choose Every from the pop-up menu.

4)	Enter a delay of 1 second into the dialog box.

5)	Click OK to accept the delay.

6)	Click the grid box corresponding to the Every action and the Mixer object with the right mouse button.

7)	Choose Change FM synthesizer left volume from the pop-up menu.

8)	Enter the following function into the expression to calculate box: "FM right vol("Mixer")+1".

9)	Click OK to accept the function.

10)	Click the grid box corresponding to the Every action and the Mixer object with the right mouse button again.

11)	Choose Change FM synthesizer right volume from the pop-up menu.

12)	Enter the following function into the expression to calculate box: "FM left vol("Mixer")-1".

13)	Click OK to accept the function.

Note: The "1" in the function statements, sets the size of the volume change. You could increase the number to adjust the balance in larger steps.

You could now assign these actions to a Active object or a Button, and change the balance directly on the screen.

See:

Change FM synthesizer volume

Change FM synthesizer left volume

Midi FM synthesizer volume

Midi FM synthesizer left volume

Midi FM synthesizer right volume


Change square wave synthesizer volume

Change square wave synthesizer volume sets the general volume of a square wave synthesizer attached to your computer. It's not supported by most sound cards, so you'll need to check with your manual before using this feature. You can set the sound level between 0 (low) to 100 (high).

Note: If you enter a value outside this range, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change FM synthesizer right Volume action. This lets you increase or decrease the sound level from the current settings.

To increase the volume, use the function: "SQ Vol("Mixer")+1".

To reduce the volume, use: "SQ Vol("Mixer")-1".

See

Change square wave synthesizer left volume

Change square wave synthesizer right volume

Midi square wave synthesizer volume

Midi square wave synthesizer left volume

Midi square wave synthesizer right volume


Change square wave synthesizer left volume

Change square wave synthesizer left volume sets the left channel of a square wave synthesizer attached to your computer. This option is only available for certain (rare) sound cards. You can set the sound level between 0 (low) to 100 (high).

Note: If you enter a value outside this range, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change square wave synthesizer left Volume action. This lets you increase or decrease the sound level from the current settings.

To increase the volume, use the function: "SQ left Vol("Mixer")+1".

To reduce the volume, use: "SQ left Vol("Mixer")-1".

You could assign these actions to a series of control buttons on the screen or change them at regular intervals to adjust the volume gradually. You can also use Change square wave synthesizer left Volume with the Change square wave synthesizer right Volume action to add a balance control to your game.

See:

Change square wave synthesizer volume

Change square wave synthesizer right volume

Midi square wave synthesizer volume

Midi square wave synthesizer left volume

Midi square wave synthesizer right volume


Change square wave synthesizer right volume

Change square wave synthesizer right volume sets the right channel of a square wave synthesizer attached to your computer. This option is only available for certain (rare) sound cards. You can set the sound level between 0 (low) to 100 (high).

Note: If you enter a value outside this range, the volume will be set to the maximum level of 100.

You'll be asked to enter the new volume when you're defining this action in the Event Editor. You can enter the new volume settings as either a number or a GF function.

Read the existing volume using the Change square wave synthesizer right Volume action. This lets you increase or decrease the sound level from the current settings.

To increase the volume, use the function: "SQ right Vol("Mixer")+1".

To reduce the volume, use: "SQ right Vol("Mixer")-1".

You could assign these actions to a series of control buttons on the screen or change them at regular intervals to adjust the volume gradually. You can also use Change square wave synthesizer right Volume with the Change square wave synthesizer left Volume action to add a balance control to your game.

See:

Change square wave synthesizer volume

Change square wave synthesizer left volume

Midi square wave synthesizer volume

Midi square wave synthesizer left volume

Midi square wave synthesizer right volume


Destroy

Destroy turns off the Mixer object, and stops it from being used by any further actions or events in your game.


MPEG object Actions

You can use these actions to move your Viewport around the screen, or control the playback for your MPEG clips. The available actions are:

General actions

Movement / Stop

Movement / Start

Movement / Set Speed

Movement / Set Maximum Speed

Movement / Wrap Around Play area

Movement / Bounce backwards

Movement / Reverse

Position / Select Position

Position / Set X coordinate

Position / Set Y coordinate

Special MPEG actions

Play / Forward

Play / Backward

Play / Step by step (in frames)

Play / A New file

Play / A New file via a file selector

Stop

Pause

Resume

Set MPEG Play position to. / Beginning

Set MPEG Play position to. / End

Set MPEG Play position to . / A Frame number

Set MPEG Play position to. / A Time Position

Size / Set Horizontal Size

Size / Set Vertical Size

Visibility / Make object Invisible

Visibility / Make object Reappear

Destroy


Play

The available Play actions are:

Forward

Backward

Step by step (in frame)

A New file

A New file via a file selector


Forward

Forward plays your file forwards from the current position. If you’re playing the clip for the first time, the movie will start from the beginning

If you've enabled the Play bar option from the set-up dialog box, the user will be able to stop the clip by clicking the appropriate button in the game.

See:

Backward

Step by step (in frames)

Stop

Pause

Resume

Resize/Set size


Backward

Backward plays the movie sequence backwards from the present position.

Note: The sound for clip will be reversed as well!

See:

Forward

Step by step (in frames)

Stop

Pause

Resume


Step by step (in frames)

Step by step (in frames) plays the movie a number of frames forwards or backwards. Positive values move the clip forward. Negative values play them in reverse. Your soundtrack will be automatically silenced during the playback.

You can use this action to generate fast forward and reverse buttons. These actions can be triggered at regular intervals using an Every event. You can control the playback speed by changing the time between each successive frame.

See:

Forward

Backward

Stop

Pause

Resume


A New file

A New file reads a chosen MPEG file from the disk. You can enter this file from a selector when you are creating this action.

You would use this action in an adventure game to play a different sequence depending on the user’s decision.


A New file via a file selector

A New file via a file selector displays a file selector so that your users can pick out a MPEG file from the disc.

If you'd like to preview the video before you load it, hold down the left mouse button over the filename. A preview window will be appear displaying the video. Click the Play arrow to the video in action.

You can check if the clip has been successfully loaded using the Check whether a file is opened condition.


Stop

Stop stops the MPEG movie at the present frame. If you select Start, the video will be repeated again from the beginning.

See:

Forward

Backward

Step by step (in frames)

Pause

Resume


Pause

Pause freezes the movie at the current point. You can restart it again using the Resume action.

See:

Forward

Backward

Step by step (in frames)

Stop

Resume


Resume

Resume restarts a frozen sequence at the current frame. Use Resume after a Pause command, to continue the movie from where you left off.

See:

Forward

Backward

Step by step (in frames)

Stop

Pause


Set MPEG Play position to

Set MPEG Play Position To actions let you move to a new position in the MPEG movie. You can Set MPEG Play Position To:

Beginning

End

A Frame Number

A Time Position


Beginning

Beginning jumps to the first frame of the MPEG movie. The video will be stopped at the new position. You can run it using a Play / Forward action.


End

End jumps to the last frame of the MPEG movie. If the video is already playing, it will be stopped.


A Frame number

A Frame number jumps directly to the chosen frame number and the video will be stopped at the new position. You start the movie playing again using a Play / Forward, or Play / Step by step (in frame) action.

You could call this option in an adventure or educational game to play a different sequence depending on the user's choice.

See

A Time Position


A Time Position

A Time Position switches to a new part of your movie. If the video is already playing, it will be stopped.

Use this option to play a different part of movie depending on the user’s actions. Enter the new position as the elapsed time in milliseconds (1/1000 seconds) since the start of your clip.

See:

A Frame number


Size

The Size options control the viewing window used to display your pictures. You can set the initial size in the Level Editor.

The following Resize MPEG options are available:

Set Horizontal Size

Set Vertical Size


Set Horizontal Size

Set Horizontal Size changes the width of your Viewport. The movie will stop for a moment while the window is being resized.


Set Vertical Size

Set Vertical Size changes the height of the Viewport. The movie will stop for a moment while the window is being resized.


Visibility

The Visibility menu lets you hide or show the movie clip on the screen. There are two possible actions

Make object Invisible

Make object Invisible hides the Viewport in the background. It lets you change the size or position of the video behind the scenes, without corrupting the display.

You can return the video to the screen with a Make object Reappear action.

Make object Reappear

Make object Reappear is used to replace a previously hidden video on the screen. It’s used after a Make object Invisible action to restore the Viewport to the display.


MPEG object Conditions

Conditions test the status of a film clip. You can use them to trigger an action when you reach a selected point in your video. You could display a helpful diagram, wait for a user's command, or run an appropriate animation sequence.

These conditions test for a collision between two objects in your game. These objects can be anything from an MPEG, to an Active object.

It's important to place the collisions first in the Event Editor to allow them to be detected the moment they occur.

Standard movement conditions

Collisions / Another object

Collisions / Overlapping another object

Collisions / Backdrop

Collisions / Overlapping a backdrop

Movement / Is "object" stopped?

Movement / Is "object" bouncing?

Movement / Compare Speed of "object" to a value

Movement / Compare Acceleration of "object" to a value

Movement / Compare Deceleration of "object" to a value

Movement / Has "object" reached the end of its path

Movement / Has "object name" reached a node in the path

Position / Test position of "object"

Position / Compare X position to a value

Position / Compare Y position to a value

Position / Is "object" getting close to window's edge

Direction / Compare direction of "object"

MPEG conditions

Is MPEG object at start position

Is MPEG object at end position

Mouse clicks within the MPEG window

Compare to current time position?

Compare to current frame position?

Check whether a file is opened

Is Visible


Is MPEG object at start position

Is MPEG object at start position tests if your MPEG object is at the beginning. You could use this condition to play a piece of music, run a music clip from the CD, or start a complex animation sequence in the background when the MPEG object begins.


Is MPEG object at end position

Is MPEG object at end position tests if your MPEG object is at the end. You could use this condition to loading another video sequence, wait for a command from the user, move to the next level, or stop the background music when the MPEG object ends.


Mouse clicks within the MPEG window

Mouse clicks within the MPEG window tests if the user has clicked in the video Viewport. Use this condition to assign the video as a control button, or drag it to another part of the screen.


Compare to current frame position

Compare to current frame position tests that the video sequence has reached a specific frame. If so, you can play an appropriate CD audio track, or stop the clip until the user enters a command.


Compare to current time position

Compare to current time position waits until a selected period of time has elapsed from the start of the video. You can now trigger the playing of a new audio track, or game demo.


Check whether a file is opened

Check whether a file is opened enables you test that there is a video sequence in memory, before you attempt to access it.


Is Visible?

Is Visible? will be True if the MPEG object is currently being displayed on the screen. You can conceal these objects by enabling the Hide on Start check box in the Setup dialog box or by using the Make object Invisible action from your game. You can display the object again with the Make object Reappear action.


MPEG Object  Functions

You can test MPEG clips for a range of information. This information can be used as part of an event to trigger a series of actions in your game. Therefore, you can start a video playing when the video reaches a selected frame, or stop the clip at particular points in the sequence.

General functions

Movement

Speed("object")	Speed

Acc("object")	Acceleration

Dec("object")	Deceleration

Position

X("object")	X coordinate

Y("object")	Y coordinate

X Left("object")	X-Coordinate of left edge

X Right("object")	X-Coordinate of right edge

Y Top("object")	Y-Coordinate of top edge

Y Bottom("object")	Y-Coordinate of bottom edge

Special MPEG functions

Video Frame(“object”)	Current frame number

Video Total Frames("object")	Total number of frames

Video Time(“object”)	Current time position

Video Total Time(“object”)	Total time

Last Error(“object”)	Last error number

Video X Size(“object”)	Horizontal size

Video Y Size(“object”)	Vertical size


Current frame number

Usage: Video Frame(“object”)

This function reads the current frame number that is being displayed on the screen. Frame numbers start at zero.


Total number of frames

Usage: Video Total Frames("object")

This function reads the total number of frames in the MPEG sequence.


Current time position

Usage: Video Time(“object”)

This function reads the time in milliseconds (1/1000ths) since the start of the video clip.

See:

Total time


Total time

Usage: Video Total Time(“object”)

This function reads the total playing time of the video in milliseconds.

See:

Current time position


Last error number

Usage: Last Error(“object”)

This function reads an error code from the device. A value of zero indicates that there are no errors. Any other value indicates a problem.


Horizontal Size

Usage: Video X Size(“object”)

This function reads the width of the display window.

See:

Vertical Size


Vertical Size

Usage: Video Y Size(“object”)

This function reads the height of the display window.

See:

Horizontal Size


Conditions

Conditions  provide the intelligence for your games. Conditions will tell you if a missile has hit an alien or when a video sequence as stopped.

Conditions can be either “True” or “False”. If a condition is True, The Games Factory will perform some actions from your game. These actions can destroy the alien or load a new video loaded from the disc. If a condition is False, nothing will happen.

The Games Factory provides you with conditions to cover practically any event. Some conditions will be added automatically by the system. For example, a "ball object", will always know how to bounce against a wall. You can enter other conditions using the Event, or the Step Through Editors.

The Event Editor allows you to choose your conditions from a range of easy to use menus and icons.

The Step Through Editor tests your game for conditions, and stops when something interesting happens. You can now select a suitable action directly from a pop-up menu. The Step Through Editor allows you to enter your games interactively from the screen. It almost creates your game for you!


Condition List

The conditions available in The Games Factory  are:

Special Conditions

Compare to a Global Value

Compare two general values

Limit Conditions

Always

Never

Group of Events

Has an option been selected?

Storyboard Controls

End of level

Start of level

The Timer Conditions

Every

Is Timer equal to a certain value

Is Timer less than a certain value

Is Timer greater than a certain value

User has left the computer since

Sound & music Conditions

Samples

Music

Create Objects Conditions

Pick an object at random

Pick a random object in a zone

Pick all objects in a zone

Pick objects with reference to their value

Compare to total number of objects

Compare to number of objects in a zone

Test for no objects in a zone

Mouse & Keyboard Conditions

Keyboard

Mouse

The Player Conditions

Joystick

Compare to player's score

Compare to player's number of lives

When number of lives reaches zero

Active object Conditions

Collisions

Another object

Overlapping another object

Backdrop

Is "object" over an obstacle background

Movement

Is "object" stopped?

Is "object" bouncing?

Compare Speed of "object" to a value

Compare Acceleration of "object " to a value

Compare Deceleration of "object " to a value

Has "object " reached the end of its path

Has "object" reached a node in the path

Animation

Which animation of "object " is playing?

Has an animation finished?

Compare current level of "object " to a value

Direction

Compare direction of "object"

Position

Test position of "object"

Compare X position to a value

Compare Y position to a value

Is "object" getting close to window's edge

Visibility

Is "object" invisible

Is "object" visible

Pick and Count

Pick "object" at random

Have all "object" been destroyed

Compare to the number of "object" objects

Test for no "object" objects in a zone

Compare to the number of "object" objects in a zone

Values

Compare to Alterable Value A

Compare to Alterable Value B

Compare to Alterable Value C

Compare to Fixed Value

Is a Flag on?

Is a Flag off?

Question and Answer object conditions

Is Answer Correct?

Is Answer False?

Is Answer Equal to a certain value?

Counter object conditions

Compare Counter to a value

Hiscore object conditions

Has a player a Hiscore

Is Visible?

Button object conditions

Box checked?

Button Clicked?

Is Visible?

Edit object conditions

Has Edit zone just been modified?

Does Edit zone have input focus?

Is Edit zone enabled?

Is Edit zone visible?

Is undo information available?

Is Text a number?Is Text Selected?

Special Video for Windows conditions

Is AVI at start position

Is AVI at end positionMouse clicks within the AVI window

Compare to current time position?

Compare to current frame position?

Check whether a file is opened

Is Visible

Special QuickTime conditions

Is QuickTime object at start position

Is QuickTime object at end position

Mouse clicks within the QuickTime window

Compare to current time position?

Check whether a file is opened

Tracks / Video track present?

Tracks / Sound track present?

Tracks / Text track present?

Tracks / Music track present?

Tracks / MPEG track present?

Tracks / Video track enabled?

Tracks / Sound track enabled?

Tracks / Text track enabled?

Tracks / Music track enabled?

Tracks / MPEG track enabled?

Is Visible?

Special FLI conditions

Compare to Current Frame

End of Animation

Is the FLI Animation Running?

Is the FLI Animation Paused?

Is the FLI Animation Invisible?

Is the FLI Animation Visible?

User clicks within the FLI Animation

Special MPEG conditions

Is MPEG object at start position

Is MPEG object at end position

Mouse clicks within the MPEG window

Compare to current time position?

Compare to current frame position?

Check whether a file is opened

Is Visible

CD audio conditions

Number of Current Track

Number of Tracks

Position in disk (1/1000s)

Length of disc (1/1000s)

Position in Current Track (1/1000s)

Length of Current Track (1/1000s)

Last Error number

MCI object conditions

Compare to returned number

Compare to returned string

Picture object conditions

A picture is loaded?Is Visible?


Introduction to Conditions

What is an Event?

Whenever you run your games, The Games Factory works frantically in the background, testing for events and performing your selected actions.

Here is a typical Event:

This event will be repeatedly tested throughout your game. If the user has entered the correct answer, the event will become True. You can now call an action to increase the user's score.

Each condition tests for a single possibility. Typical conditions include:

Big Ball leaves the play area

Collision between Big Ball and Skate Dude

Have all Soldiers been destroyed

Number of lives of Player 1 = 0

Is "Video" getting close to window's edge

Compare to current time position

Start of video

End of video

Is a music not playing

Is Timer equal to a certain value

Start of level

End of level

See:

Events & Conditions

Types of Conditions


Events and Conditions

Events can be composed of several different conditions.

Conditions can be either True or False. If the condition is True, the chosen action will be performed in your game. If they are False, the actions will be ignored.

If an event contains more than one condition, the result will be True if ALL the individual tests are also True.

For example. we could create a single event which tested whether the user had completed the current level, and got five answers right. If so, we could display an appropriate message on the screen.

Edit a condition by clicking the description in the Event Editor with the right mouse button. There are five options available from the pop-up menu:

Negate reverses the effect of the test. This option is only available for certain conditions types.

Edit switches the condition with another condition of the same type.

Replace changes the condition with a completely different one.

Insert adds a comment, event, or group of events at the current line.

Delete erases the condition completely. If this is the only condition in the event, all the associated actions will be lost.


List Conditions that Can be Negated

You can use Negate with the following conditions:

Repeat while mouse-key is pressed

Check for mouse pointer over an object

Check for mouse pointer in a zone

Repeat while key is pressed

Upon pressing a key

Is a music not playing?

Is a sample not playing?

Is a specific music not playing?

Is a specific sample not playing?

Repeat while joystick pressed

Check for activation

Is "object" getting close to window's edge

Which animation is playing?

Compare direction of "object"

Is "object" stopped?

Is "object" bouncing?

Overlapping another object

Overlapping a backdrop

String is Activated


How Conditions work

This section includes a detailed explanation of the way conditions and events are actually tested in your game.

As you'll recall, each event can be composed of a number of different Conditions. The testing method varies depending on the first condition in the event.

There are two possibilities:

If the first condition is “Immediate”, it will be detected the moment it occurs in your game.

Immediate Conditions are tested in the following order:

Collisions between Objects

Collisions with the Background

An Object leaves or enters the Play field

The User Clicks on an object, the play field, or a zone

The User presses a Key

The Player presses a Key

A start of game Condition

The Timer reaches a specific value

If you've several conditions of the same type, they'll be tested in the same order you originally entered them.

Normal Conditions are tested just as they appear in the Event Editor. These are normal conditions:

Comparisons

Special Conditions

Object Movements, Animations, Directions ..

Sound and Music Conditions

Storyboard Controls

Create New Objects tests

Question and Answer tests

Counter checks

External Conditions

The Games Factory will start at the first event, and move down through your conditions. If a condition affects several objects, each object will be examined in turn. When The Games Factory has reached the last event, it will repeat the tests from the beginning, starting a new "Event cycle".

Note:  Since Immediate Conditions are tested first, they should always be placed before Normal conditions in the Event Editor. This will ensure that your events will be detected the moment they occur in your game.


Comparing Values

The Games Factory controls your objects using a number of different "Values" in your game.

Some of these values are general, such as the position of the mouse cursor, or the elapsed time since the start of the game. Other values are taken from an object. Each object has its own set of "Attributes" which define its location, contents, or appearance. The nature of these attributes depends on the type of the object.

Active Objects have a speed, direction, animation frame, and position.

Counter Objects have a value.

CD Objects store the number of the current track.

Video for Windows Objects have a display area, position, and frame number.

You can test these values using a range of "functions" from the Expression Evaluator. You can easily test whether an active object has reached a certain screen position, or a counter has reached a selected value.

See:

Comparison options

General Comparisons

Special Comparisons

Comparing strings of characters

How the Edit button works


Comparison options

The Games Factory provides you with the following comparison options:

Name	Symbol
Equal	=
Lower or equal	<=
Greater or equal	>=
Different	<>
Lower	<
Greater	>

Here are a few examples of these conditions:

X position of Romeo = 0

Score of Player 1 > 1000

Timer equals 01"00

Random(6)<3

XMouse = 100


General Comparisons

General Comparisons are used to compare any two values in your game. You can type these values from the keyboard, or click the Edit button and calculate them using the Expression Evaluator. Click the Retrieve data from an object option to read the attributes from an object or system function.

Each function has a name which can be typed directly into the expression box. This gives you a fast way of checking the important values in your games.

Examples of function names include:

timer

level

nobjects

Score("Player 1")

X("Active object 2")


Special Comparisons

Here’s a list of the comparison options used to test individual components of The Games Factory system.

Timer Comparisons

Is Timer equal to a certain value

Is Timer less than a certain value

Is Timer greater than a certain value

Compare to total number of objects

Compare to number of objects in a zone

Compare to player's score

Compare to player's number of lives

Compare to a Global Value

Active object Comparisons

Compare speed of "object" to a value

Compare acceleration of "object" to a value

Compare deceleration of "object" to a value

Compare current frame of "object" to a value

Compare X position to a value

Compare Y position to a value

Compare direction of "object"

Compare to number of "object" objects

Compare to number of "object" in a zone

Compare to Alterable Value A

Compare to Alterable Value B

Compare to Alterable Value C

Compare to Fixed Value

Is a Flag on?

Is a Flag off?

Counter object Comparisons

Compare Counter to a value


Comparing strings of characters

If your objects generates messages, you can compare these messages to a selected piece of text. Enter the text between quotation marks in the Expression Evaluator.

For example, Is Alterable String=“Test”

Both sides of the comparison should contain the same type of information. If you want to compare text to a value, you should convert the value into a “Str$” function.


How the Edit button works

The Edit button moves you to The Games Factory Expression Evaluator. You can use the Expression Evaluator to enter a complex expression for your use in your comparison.

The Retrieve Data from an object button in the Expression Evaluator provides a simple way of reading your values from an object or system function. When the Retrieve Data from an object button is selected, a dialog box will be displayed showing all of the available objects in your game. Each object will be represented by an icon on the display. Some of these icons are special, they let you generate random numbers, test the mouse coordinates, or read the internal timer.

Double click an icon to display the function menu. The function options depend on the type of object you are testing.

The available functions are:

Active Objects

Speed

Position

Direction

Animation

Alterable Values

Flags

Text Objects

Number of the currently displayed paragraph

CD Audio Objects

Current track number

Total number of tracks

Position on the disk or in the current track

Length of the disc or the current track

Video for Windows Objects

Current frame number

Total number of video frames

Current time position

Length of the clip in milliseconds

Width or height of their viewing window

Quick Time Objects

Time they have been playing from the start of the clip

Length of the video in 1000ths of a second

Horizontal and vertical size

Number of Tracks

MCI Objects

Return value from the previous command

Last error number

Special

Randomly generated number

Game drive name

Game directory

Game path name

Game filename

Mouse & Keyboard

Current mouse coordinates

The Timer

Amount of time that has elapsed since the start of the game.


Creating a new condition

After you've defined your objects in the Level Editor, enter the actions for your objects using the Event or Step Through Editors.

See:

Creating a new condition from the Event Editor

Creating a condition from the Step Through Editor


Creating a new condition from the Event Editor

New conditions are created in the Event Editor. You can display the Event Editor by clicking Window, Event Editor from the menu bar or clicking the Event Editor icon ( [image]) from the toolbar.

There are four different ways to add a condition to your game:

1)	Click the New icon ( [image]) and choose New Line of Events ( [image]) from the pop-up menu.

2)	Click the New Condition box at the bottom of the event list.

3)	Click a condition with the right mouse button and choose the Insert from the pop-up menu.

4)	Click an event number with the right mouse button and choose Insert, A new Line from the pop-up menu.

After any of the above methods, a dialog box containing a number of icons will be displayed. Each icon represents a particular type of condition. Move the mouse pointer over an icon to display a description.

Double click an object to test. A pop-up menu will be displayed containing the conditions available for that object. Click OK to accept the condition.

Each event is displayed in its own line in the Event Editor. Click an event name with the right mouse button to display a menu with the following options:

Negate reverses the effect of the condition. This option is not available for all objects.

Edit changes the condition with another one of the same type.

Replace chooses a replacement from the selector.

Insert adds a new comment, event, or group of events.

Delete erases your condition. If the condition is the last condition in the event, the entire event will be erased and you will lose any related actions.


Creating a condition from the Step Through Editor

Call up the Step Through Editor by clicking the Step Through Editor icon ( [image]) from the control bar.

You can now either wait for an event to occur, or trigger an event yourself. Move the mouse, hit a key, or press ESC to create a Timer equals event. The Step Through Editor will appear, and you'll be able to add your actions to the game.


Special Conditions

Special Conditions give you precise control over your Objects and events.

The Special Conditions menu provides you with five options:

Compare to a Global Value tests one of the sixteen Global Values in your game.

Compare two general values compares any two attributes of objects in your game. You can use this condition to test the position, direction, or animation sequence of your object against a selected value.

Limit Conditions changes the way your events will be tested.

Always/Never turns an entire event on or off.

Group of Events tests whether a group of events has been activated in your game.

Has an option been selected? checks whether

 the user has chosen a specific option from the games’ menu bar.

See:

Comparison options

Compare to a Global Value

General Comparisons

Run this event once

Only one action when event loops

Repeat

Restrict actions

Always

Never

Has an option been selected?


Compare to a Global Value

Compare to a Global Value tests the contents of a Global Value. Each value is identified by a number from 1 to 16. Enter a number using the slider or type in a value from the keyboard.

You can alter a value's contents using the Change a Global Value action. You can read it into your calculations using the Retrieve a Global Value function.


Compare two general values

Compare two general values provides a general testing option, and compares any two values in your game. You can take these values from either an object, a function, or type the values directly from the keyboard.

This comparison tests the first value against the contents of the second, and triggers your actions if they satisfy the chosen condition. You can set the "type" of condition using the How to compare buttons.

Each value is entered in its own line on the screen. Enter the value by using the using the slider or enter a value from the keyboard. You can also click the Edit button and enter a calculation in the Expression Evaluator.

The Expression Evaluator forms the gateway to dozens of available functions. You can call these functions by clicking Retrieve data from an object button and choosing an option from the dialog box.

See:

The How to Compare buttons

Comparison options


The How to Compare buttons

The How to Compare buttons choose the type of the test to be performed.

Equal will be true if both values are exactly the same. When you see the comparison in the Event Editor, it will be represented by an equals "=" sign.

Less or Equal will be true if the first value is less than or equal to the second. It will be shown in the editor as a "<=" symbol.

Greater or equal will be true if the first value is greater than or equal to the second. It's symbolized by ">=".

Different will be true if the two values are NOT the same. It's displayed as "<>".

Less will be true if the first value is less than the second. It's shown as "<" in the Event Editor.

Greater will be true if the first value is larger than the second. It's indicated by a ">" sign.


Limit Conditions

The Limit Conditions add extra controls to your events. You can these conditions to turn events off after they've been used, or limit them to specific times in your game.

These conditions are quite advanced, so if you are beginner you can happily ignore them! The available limit conditions are:

Run this event once

Only one action when event loops

Repeat

Restrict actions


Run this event once

Run this event once creates a "one shot" test. This condition turns off an event after it becomes true. If its the first condition, the entire event will be tested exactly once, at the start of your level. If it's preceded by some other conditions, the event will only be active the first time these conditions become true.

Let's see how this works with an example. Imagine you were creating a platform game and you wanted to spring a trap when the player walked over a trip-wire.

The wire could be generated using an invisible screen zone, but this object would be triggered whenever the player crossed the wire. You might add a Run this event once condition after the initial test. This would ensure that the trap would only be sprung the first time it was encountered. After that, the test would be ignored.


Only one action when event loops

As a rule, The Games Factory will repeat your actions as long as your conditions are satisfied. Usually this is fine, but sometimes it can generate a lot of unwanted effects.

The actions will be repeated continuously while an event is true, even if you only want to run them once.

You can avoid this problem by starting your event with an Only one action when event loops condition. This condition will perform your actions when the result of your condition changes from false to true.

Let's look at an example of how this works. Supposing you wanted to award an extra life when the player's score exceeded 10,000. You could test this using a simple comparison:

Score of Player 1 > 10000

Unfortunately, once the score has exceeded 10,000, it will always be greater than your limit. So every time The Games Factory encounters this condition, it will automatically add another life to the player's total. After a few seconds, the number of lives will get very large, and the player will be virtually indestructible. You will end up by giving the player an infinite number of lives, instead of just one.

The solution is to insert an Only one action when event loops condition at the beginning of your event. This will ensure that the lives are only changed when the score PASSES 10,000. Any future conditions will be ignored until the score drops below 10,000.


Repeat

The Repeat condition is used to select the number of times your event will be true. It counts the successful tests, and turns the event off when this number is exceeded. After it's reached the limit, your event will be ignored for the rest of the level.

You can call this condition with the Start of level test to create several objects at the beginning of your game. This condition could be used to generate anything from an alien space-fleet to a deck of cards.

You could also combine this condition with an Every condition to repeat a movement a specific number of times, or combine it with the Shoot object option to restrict the number of missiles available to the player.

Note: This feature will be overridden by the Upon Pressing A Key condition. This takes priority, so if it's included, the tests will be performed throughout your game.


Restrict Actions

The Games Factory performs your tests at the maximum possible speed, and will usually detect a condition in an instant. Sometimes, The Games Factory is too fast!

Restrict actions adds a delay between your events and tests your events at regular intervals during your game. Enter this delay in 100ths of a second when you set up the event.

In an arcade game, you might want to limit the user's firing rate to a single missile per second. You could read the fire button from the Player/Joystick condition, and add a Restrict Action to 1 per second condition to slow down the event.


Always/Never

These tests force your events to be either true or false. There are two possibilities:

Always

Never


Always

Always sets the current event to true for the duration of your game. If an Always condition is included, the actions will be called every time the events are tested, even if the rest of the conditions are false. This condition is ideal for continuous actions such as moving an object or increasing a counter.


Never

Never switches the event to false. It stops your actions from being run, even if the remaining conditions are true. You can use this condition to temporarily remove some of the conditions during testing.

Occasionally, you'll want to give your player "infinite lives" when you are testing your game. This lets you test your objects movement without having to worry about the possibility of collisions. Insert a Never condition into your collision detector and start playing. When you've finished you can re-activate the detection by dragging the Never condition over the garbage can to delete it.


Group of Events

The Group of Events, Check for Activation event tests whether an event group has been activated in your game.

These event groups can be used to toggle between various modes. You can use this test to discover which control options have been selected by the user or whether they've chosen "Easy mode" or "Hard mode".

After you've called this option, you'll be asked to pick an event group from a dialog box.

Note:  You can reverse the effect of this condition using the Negate option from the Event Editor. Negate enables you test if the group is NOT activated.


Has an option been selected?

This reports back when the user selects a chosen option on the Game’s menu bar.

You’ll be asked to enter the item to be tested from a menu. Simply select the “Click Here” button with the mouse, and choose your option from the pop up menu. Each title has its own submenu

You can type in your own menu entries using the “Edit menu” option from the “Game Set-up” dialogue.

You can control the menu using the “Enable”, “Disable”, “Check”, and “Uncheck” actions.


Storyboard Controls

Storyboard Control conditions test for the beginning or end of a game level. These conditions are called when you move to a new level using the Storyboard Controls.

There are two conditions to choose from:

End of level

Start of level

You can use these options with other conditions to test for specific combinations of events. You might, for example, test for both the End of a level, and the number of the player's lives. You could test these using separate Events such as:

End of level

+ Lives of Player 1 =1

End of level

+ Lives of Player 1>1

If one of these events was true, you could award an appropriate bonus.


Start of level

Start Of level performs your actions when the level starts. You can use this condition to set up attack waves, display an introduction, or play some music.

In a card game, for instance, you could create a deck of cards and shuffle them at the start of the level. In an educational game, you could ask the user to choose the difficulty level using a Question and Answer object.


End Of level

The End of level condition will be triggered when the current game level ends. This condition is great for displaying credits, playing a final sound track, or adding level bonuses to a game.

When your level finishes, The Games Factory will normally move to the next level in the Storyboard. You can change this by setting a different destination level in the Storyboard Editor. You can also add a dissolve effect by choosing a Fade option from the Level's pop-up menu.

Note: Unless your objects are Global, they'll be automatically deleted at the end of the current level. You don't need to delete objects yourself.

You can move to a new level using the Next level, Previous level, Jump to level, and Restart the game actions.


Timer Conditions

The Timer Conditions let you trigger your actions after a selected time interval.

The Games Factory has an internal timer which is set to zero at the beginning of your game. This timer increases by one every thousandth of a second. You can see the current time on The Games Factory Toolbar.

You can test the timer using the following conditions:

Every

Is Timer equal to a certain value

Is Timer less than a certain value

Is Timer greater than a certain value

User has left the computer since

You can read the elapsed timer using a series of functions from the Expression Evaluator:

Here’s a list of the available functions:

Timer count in 1/1000 of a second since start of level

Timer count,hours

Timer count,seconds

Timer count 1/100 value

Timer count minutes


Every

The Every condition calls a series of actions at regular intervals. This condition provides a general way of repeating your actions during a game.

When you enter this condition, you'll be asked to choose a delay between each set of actions. The selector is divided into minutes, seconds, and hundredth of seconds boxes. Type the value from the keyboard or adjust the values using the slider.

The Every condition has lots of games. You can use Every to:

Repeat a sound effect

Display the status of a sound or movie clip

Change the coordinates of an object at regular intervals

Continually adjust the heading of a guided missile

Work out the computers move in a strategy game

Display a ticking clock

Reduce a player's fuel as the time increases


Is Timer equal to a certain value

The Is Timer Equal to a certain value condition triggers your actions after a chosen time period. You can enter the delay in minutes, seconds, and hundredths from the start of your game

You can use this condition to spring a trap in an adventure or platform game.


Is Timer less than a certain value

The Is Timer less than a certain value condition triggers your actions until the timer reaches a specified value. You can enter this value in minutes, seconds, and hundredths of seconds from the start of your game.

Is Timer less than a certain value can be used with other conditions to divide a level into several phases. Each phase can have its own unique set of actions and events. You can create these phases by adding an appropriate Is Timer less than a certain value condition to the start of an event. This restricts all the events to a specific time period.

For example,

Timer < 1"00

+ Player 1 Lives=0

could have a different set of actions to:

Timer > 1"00

+Player 1 Lives=0

So, an arcade game could refuse to kill a player for the first minute of the game.

There are lots of other games. An educational game could display additional hints at the start.  An adventure game could gradually introduce new characters or puzzles.


Is Timer greater than a certain value

The Is Timer greater than a certain value condition performs your actions after a selected delay. You can enter the delay in minutes, seconds, and hundredths from the start of your game

If you add Is Timer greater than a certain value, as the first condition in an event, the event will only be active after the chosen time period.

For example, an event such as:

Timer > 1"00

+Check for a collision between "Ship" and "Missile"

will only be tested after the first minute.


User has left the computer since

The User has left the computer Since condition triggers your actions if the user hasn't done anything after a selected interval. This condition tests whether the user has pressed a key, or moved the mouse in the chosen period of time. If not, your actions are called.

You’d would use this condition in a multimedia game to return to the main menu if the user leaves the computer unattended.


Sound and Music Conditions

If you've got a sound card, you'll be able to add sound or music effects into your games. You can test for these sounds using a range of simple conditions, and trigger some actions when they've stopped playing. There are two separate menus:

Sample

Sample tests for a single note or sound sample. You can complete the following tests:

Is a sample not playing

Is a specific sample not playing

Music

Music tests for MIDI compatible music using the following conditions:

Is a music not playing

Is a specific music not playing

You can reverse these tests using the Negate option. Using Negate will adds an X in front of the current condition. Negate will change the meaning of the test. For example,

X Is a specific sample not playing - will be true if the named sample is currently being played.

X Is a music not playing - will be true if some music IS playing.


Sample

The sample menu tests whether a sound effect is being played using the Play sample action.

You can use this test to check for all possible samples or just a selected one. There are two possibilities:

Is a sample not playing

Is a specific sample not playing

These conditions can be reversed using the Negate option in the Event Editor. Negate enables you to test whether a sample or music fragment is actually playing.


Is a sample not playing

This condition will only perform actions if you're game is not currently playing a sound sample.

In a demonstration, you might wait for a sample to complete before starting another piece of music. In a game, you could add an Is a sample not Playing test after an object was destroyed to hear the explosion before the game stops.

You can reverse this option using the Negate option. A negated condition will enable you to test whether a sample is playing.


Is a specific sample not playing

The Is a specific sample not Playing condition tests a single sample in your game. It will only perform your actions if the chosen sample is not playing. You'll be asked to enter the name of the sample when you are entering the condition.

You can reverse this option using the Negate option. A negated condition will enable you to test whether a sample is playing.

In an adventure game, you might wait for each character's speech to end before starting a new one. In an arcade game you could play an explosion effect after a player's ship was destroyed. You could now test for this explosion at other points in your game to trigger an appropriate series of messages.


Music

The Music menu tests the status of some MIDI compatible music played through your speakers. As with sound samples, you can test for any music or just a specific piece. The available conditions are:

Is a music not playing

Is a specific music not playing


Is a music not playing

This condition calls your actions if you are not playing any music.

You can reverse this condition with the Negate option to test whether music IS playing.


Is a specific music not playing

The Is a specific music not playing tests whether a named piece of music is currently playing. If not, it an action is triggered in your game.

You can reverse this condition with the Negate option to test whether a named music sample music IS playing.

You can wait for your music to finish using the following procedure. Define a counter object elsewhere in your game. Whenever you play a piece of music, set this counter to an appropriate value. Each piece should have a different identification number, such a 1,2, or 3.

You can now test for the sample finishing with an event like:

"Music Counter" = 1

+Tune 1 is not playing

This condition will be true if music tune one has been played, and has finished. You can stop this event from being detected again by changing the "Music Counter" back to zero with a Set counter action.

In a game, you could generate the end of game music. Start the music when the number of lives reaches zero, and wait for it to complete using an event such as:

Number of Lives of Player 1 = 0

+Mymusic is not playing


New Objects Conditions

The New Objects Conditions provide general control over the Active Objects in your game. These conditions let you pick some Active Objects for special treatment. You can select your objects at random, or according to their Alterable Values or positions.

The New Object conditions are:

Pick an object at random

Pick a random object in a zone

Pick all objects in a zone

Pick objects with reference to their value

Compare to total number of objects

Compare to number of objects in a zone

Test for no objects in a zone


Pick an object at random

Pick an object at Random performs your actions on a single active object, chosen completely at a random. The selected object could be any clone of any active object in your game.

When you're creating this event, you can assign actions to each object by clicking the icon in the Event or Step Through Editor. Each object can have its own set of actions which will be called up if the object is selected. If you don't define any actions, the object will be totally unaffected.

The key to using this option is to only set up the actions for the objects that you actually want to change. If The Games Factory selects an object with no actions, absolutely nothing will happen. The only reaction will be a tiny pause in your game.

One drawback with this feature is that it makes the selection from all the Active Objects in your game. If you want to pick out a single clone of a specific object, you should use Pick ‘object’ at random instead. You can also use this with object groups. These let you choose from a range of "alien" or "message" objects.

Each set of objects can be linked into a particular group in the Level Editor. You can test this group as if it were a single object. Pick ‘object’ at random will choose any object from this group.

See:

Pick a random object in a zone


Pick a random object in a zone

The Pick a random object in a zone condition chooses one of several Active Objects which is in a selected screen zone. Each object can have its own set of actions, which will be triggered automatically if they are true. If an object has no actions, there will be no effect.

The screen zone can be anywhere on the playfield. Each event in the game can have its own zone. You can set the size and position of the zone by typing the coordinates into a dialog box, or dragging a rectangle across the screen.

This condition has a number of different uses. In platform game, you could place your zones around each platform, and randomly pick an enemy to move towards the player. In a card game, you could place all the cards in a pack, and deal one card at random to the player. You'd enclose the pack in its own zone, and move the card outside this zone when it was selected. Once you'd dealt a card, it would be permanently removed from the selection process.


Pick all objects in a zone

The Pick all objects in a zone condition selects all the Active Objects in a rectangular area, and manipulates them as a group. Each object can have its own set of actions which will be performed when the object enters your zone.

You can place this zone over any part of the screen. It's set-up when you're defining the condition in the Event or Step Through Editors.

There are lots of possible uses. In a ball game, you could change the speed of an object when it entered a particular region. In a simulation, you could wrap a zone around your planets and move the Objects to simulate the force of gravity. In a platform game, you could enclose each platform in a different zone, and control the objects moving along them using your own movement systems. You can also create holes or traps which snare characters that are unlucky enough to enter them.


Pick Objects with reference to their value

The Pick Objects with reference to their Value condition enables you to choose all the Active Objects with a particular range of values.

Each value can represent a different set of control options for your objects. You can change these values to enter new commands during a game. Pick the command from either an Alterable Value, a Fixed Value, or a Flag. You can select the value from the following menu:

Alterable A

Alterable B

Alterable C

Fixed

Flags (Numbered 0 to 31)

The Flags could be used in an adventure or educational game to record whether an object was "picked up" by the player. You could set a Flag to ON if an object was held by the player, or OFF it was on the floor. You could now display all the objects in the player's pockets by calling a Pick an object according to its Flag option.


Compare to total number of Objects

The Compare to total number of Objects condition triggers your actions when the number of Active Objects reaches a selected trigger value.

If you're creating an arcade game, you could use this feature to add new enemies if the numbers get too low. If you're creating a simulation, you can stop the game when all the inhabitants died.

See:

Compare to number of objects in a zone


Compare to number of objects in a zone

The Compare to number of objects in a zone condition tests a rectangular region of the screen and counts the number of Active Objects inside it. If the number of objects equals your chosen value, The Games Factory will call the appropriate actions.

You can use this to stop objects entering over-populated regions, test the number of surviving targets in a shooting game, or limit the number of monsters on a platform.


Test for no objects in a zone

The Test for no objects in a zone condition performs your actions if there are no Active Objects in the selected screen region. You could apply this option in a card game to display each card in a different "slot" on the display.


Mouse and Keyboard Conditions

Mouse and Keyboard Conditions enable you to call actions whenever a player hits a specific key or selects a button from the screen. The available conditions are:

Keyboard

Upon pressing a key

Repeat while a key is pressed

Is any key pressed

Mouse

Check for mouse pointer in a zone (Can be Negated)

Check for mouse pointer over an object (Can be Negated)

User Clicks

Repeat while mouse-key pressed (Can be Negated)

User Clicks within a zone

User Clicks on an object


The Keyboard

The Keyboard option tests for a key-press entered by the user. When you select this condition, you'll be asked to press the key you wish to test. This key can be a letter or number, or a function key such as F1, or SHIFT.

Note: These options test for the actual key, and not its internal value. Therefore, a digit from the numeric pad will be treated differently from the same number on the main keyboard.

The Keyboard conditions are:

Upon pressing a key

Repeat while a key is pressed

Is any key pressed

You can Negate these conditions in the Event Editor to test whether the user has NOT pressed a specific key.

You can also use the Is any key pressed option to test whether the user has hit any key.


Upon pressing a key

Upon pressing a key tests for a SINGLE key press. A separate press is required for each set of actions.

Note: If you insert this test as the first condition in your event, the action will be performed the instant you press the key.

If you want to test that a key has not been pressed, you can reverse this test using the Negate option.


Repeat while a key is pressed

Repeat while a key is pressed will be true whenever the chosen key is held down. This condition is used for controlling continuous actions such as movements.

You can reverse this condition using the Negate option to test that a key is NOT pressed. This will repeat your actions for the duration of your game. If the user presses the selected key, the actions will pause until the key is released.


Is any key pressed

Is any key pressed waits for a key-press, and triggers your actions. It does not matter what key the user presses, the condition will test for all of the keys.

You would use this condition after displaying a Press a key to Continue message to wait for the user’s input.


The Mouse

The Mouse Conditions allow you to create control panels or select the elements for a graphic adventure!

Note: If you've assigned the mouse to an object using the Mouse Movement option, these conditions will be totally ignored. Since the object has been assigned to the player, you can test the mouse buttons with the Joystick option from the Player conditions. Fire 1 now corresponds to the left button, and Fire 2 to the right.

Choosing a mouse click

You can choose the type of mouse click by selecting one from a series of the Choose Mouse radio buttons:

Left tests the left mouse button.

Middle tests the middle button. This will only work on the right button mouse.

Right tests the Right mouse button

What Kind of click

Choose from a single, or double mouse click.

When you've made your selection, click OK to accept the settings or Cancel to abort.

The available Mouse conditions are:

Check for mouse pointer in a zone

Check for mouse pointer over an object

User Clicks

Repeat while mouse-key is pressed

User Clicks within a zone

User Clicks on an object


Check for mouse pointer in a zone

Check for mouse pointer in a zone will be true if you've placed the mouse over a rectangular zone on the screen. You can use it this condition to display menus or jump between control panels in your game. When you're defining this event, you'll be asked to enter the position and size of your zone.

You can reverse this test using the Negate option. This lets you test if the mouse pointer is NOT in the selected zone.


Check for mouse pointer over an object

Check for mouse pointer over an Object will be true if the mouse pointer has been moved over a specific object.

Use this condition to select the objects in a graphic adventure, or the text in a menu.

You can reverse this option using the Negate command. This lets you test that the mouse pointer is NOT over the chosen object.


User Clicks

User Clicks will be true if the user clicks on one of the mouse buttons. You can use this condition to test for a single or double click on the left, right, or middle buttons.

The User Clicks condition lets you trigger a single action in your game. Use this condition to fire a missile in an arcade game, release the ball in a rebound game, or start a new game.


Repeat while mouse-key is pressed

Repeat while mouse-key is pressed repeats your selected actions while the user is pressing the mouse key. You can assign the actions to either the left, middle, or right mouse buttons.

Note: The middle button is not always available so use this option with care.

This condition is great for continuous actions. It provides a valuable alternative to the joystick for your GF games.

In an arcade game, you could use the left button to fire a missile and the right button to raise the shields.

You can use the Negate option in the Event Editor to perform your actions while the mouse-key is NOT pressed. This lets you pause the actions until the user releases the mouse.


User Clicks within a zone

User Clicks within a zone will be true if the user clicks on a rectangular zone on the screen.

You can use condition to generate simple menus or buttons.


User Clicks on an object

User Clicks on an object will be true if the player clicks an Active object in your game.

This condition is great for testing the buttons on a control panel. Each button can be defined as an Active Object, with different animation types for the "Selected" and "Unselected" positions.

Here's a fast way of creating the buttons for your control panels.

Type the button details into a text object, and adjust the style as required. Click your text object with the right mouse button and choose New Object,

Active from the pop-up menu. Click the playfield to drop the new Active Object into place.  Delete the original text object and edit your button using the Picture Editor.


Player Conditions

The Player Conditions test the status of each player in your game and read the position of the Joystick.

The available Player Conditions are:

Read joystickstate

Repeat while key is pressed

Compare to player's score

Compare to player's number of lives

When number of lives reaches 0

You'll only be able to test a Player if you've previously assigned the player to an object in the Level Editor.

Creating a new player

Define an Active Object for each player.

Click the Active Object with the right mouse button and choose Movement, Select Movement from the pop-up menu.

Choose a Player controlled movement for the Active object.  Use either Platform or Eight Direction.

Define the setting for the Movement options. Click OK to accept the settings.

Click the Active Object with the right mouse button and choose Movement, Moved By from the pop-up menu.  Select a player number to assign the object to.

When you jump back to the Event Editor, you'll see a new icon for each player.

Note: It is acceptable to assign several objects to the same player. Each object will interpret the users commands in its own way.


Joystick Conditions

The Joystick conditions test a joystick that is plugged into your computer. There are two Joystick Conditions:

Read Joystick State

Repeat while a key is pressed

If the user doesn't have a joystick, or hasn't activated it, the joystick will be simulated using the following keyboard keys:

Joystick Left	Left Arrow
Joystick Right	Right Arrow
Joystick Up	Up Arrow
Joystick Down	Down Arrow
Fire 1	Shift
Fire 2	Control

Diagonal movements can be generated by pressing two keys at once.

Selecting a joystick direction

You can enter the current joystick direction by clicking one of the dots around the clock face. An arrow will appear to show that the direction has been selected.


Read joystick state

Read joystick state tests for a single pull on the joystick. You can test for a movement in any direction, or if the fire buttons were pressed.


Repeat while key is pressed

Repeat while key is pressed tests the Joystick continuously. Your actions will be repeated until the player presses a button or shifts the joystick to a new direction. You can use this option to enter the commands in your arcade or platform games.

You can reverse this condition using the Negate option. This repeats your actions while the key is NOT pressed.


Compare to player's number of lives

Compare to player's number of lives tests the number of the player's lives. Use this condition when awarding bonuses to limit the lives on the screen.


Compare to player's score

Compare to player's score tests the player's current score. You can add extra bonuses for high-scores. For example, add a special level for very skilled players, add new guns, shields, or lives, add a password to re-enter the game at the present level.


Object Conditions

Each object can be examined independently in your game. In our examples, we've used "object" to represent the name of your objects. These names could be anything you like, and can be changed in the Level Editor.

Each object has its own unique set of conditions. Display the conditions menu by double clicking an icon in the condition selector.

See:

Active Object Conditions for

Text Object Conditions

Question and Answer Object Conditions

Counter Object Conditions


Active Object Conditions

Active Objects can tested according to their movements, positions, or animations. You can also test for a collision between another object or a background obstacle.

Once you detect a collision, you can perform the appropriate actions in your game. Here is a list of the available conditions:

Collisions

Another object

Overlapping another object

Backdrop

Is "object" over an obstacle background

Movement

Is "object" stopped?

Is "object" bouncing?

Compare Speed of "object" to a value

Compare Acceleration of "object " to a value

Compare Deceleration of "object " to a value

Has "object " reached the end of its path

Has "object" reached a node in the path

Animation

Which animation of "object " is playing?

Has an animation finished?

Compare current level of "object " to a value

Direction

Compare direction of "object"

Position

Test position of "object"

Compare X position to a value

Compare Y position to a value

Is "object" getting close to window's edge

Visibility

Is "object" invisible

Is "object" visible

Pick and Count

Pick "object" at random

Have all "object" been destroyed

Compare to the number of "object" objects

Test for no "object" objects in a zone

Compare to the number of "object" objects in a zone

Values

Compare to Alterable Value A

Compare to Alterable Value B

Compare to Alterable Value C

Compare to Fixed Value

Is a Flag on?

Is a Flag off?


Collision Conditions

Collision conditions test for a collision between the moving objects in your game. It's important to place the collisions as the first test in your event, as this will allow them to be detected the moment they occur.

You can use collision conditions for a range of different purposes. In an arcade game, you could test if a missile had hit an alien, or the player's ship had collided with a bomb. In a rebound game, you could test for a collision between the bat and the ball, or the ball and a wall. In a platform game, you could find out if a character had walked into an obstacle.

The available collision detection options are:

Another object tests for a single collision with another multimedia object.

Overlapping another object tests for a continuous collision between any two objects.

Backdrop tests for a single collision with a backdrop obstacle.

Overlapping a backdrop  tests for a continuous collision with a backdrop,


Detection modes

Your objects can be tested using "Fine mode" or "Box mode".

To select the detection mode, in the Level Editor, click on the object with the right mouse button. Choose Preferences from the pop-up menu. Click the Extra tab in the Objects Preferences dialog box. Enable the Collision detection check box to use Fine Detection. Disable the Box detection check box.

Fine Detection

By default, a collision will be detected whenever your objects are visibly touching on the screen.

You can change this method of detection by using Box mode.

Box mode detection

Box mode detection defines an invisible rectangle around each object starting at the hot spot. If the two rectangles touch, then a collision will be detected in your game.

Fine detection is slightly slower than the Box mode, but it's a lot more accurate. You may need to experiment to see which method works best in your game.


Another object

Another object provides a general way of detecting for a collision between two multimedia objects in your game. If there are several objects of the same type, each clone will be tested individually. Your actions will be performed on all the clones that are colliding.

You can use this condition to test for a missile hitting an alien, or an attacker hitting the player's spaceship. Each collision will be detected exactly ONCE. So a single collision will generate a single set of actions.

You can reverse this condition using the Negate option to perform actions when your objects are not colliding.


Backdrop

Backdrop tests for a collision between an active object and an "Obstacle". These obstacles can be either Backdrop, or Quick Backdrop Objects.

Define an object as a Backdrop in the Level Editor. Click the object with the right mouse button and choose New Object, Backdrop or Quick Backdrop from the pop-up menu.

You can use this condition to make your game react if an object has hit part of the background. You can either bounce the object away from the backdrop or perform an appropriate action, such as climbing.

You can also reverse this condition using the Negate option. This will test if an object is NOT colliding with a backdrop.

Box mode

Box mode tests whether an object is touching a rectangular box around the backdrop. Box mode is the default setting.

Fine mode

Fine mode examines each point in the source object to see if it is touching the backdrop. Select fine mode by turning the disabling the Use Fine Detection check box.

Fine mode can ONLY be used for Backdrops. Any attempt to select it for a Quick Backdrop will be completely ignored.


Is "object " overlapping another object

This condition tests whether two multimedia objects are visibly overlapping on the screen. It's similar to the fine detection system but unlike collisions, overlapping events are tested continuously. They will remain true until your objects move apart.

There are a number of uses for this condition. In a platform game, you could test whether a character was walking over another object. You could compare coordinates to test whether your character was behind the object and starting to overlap it.


Is "object" over an obstacle background

Is "object" over an obstacle background tests whether your object is overlapping a backdrop object. This condition will be continuously true while the object is over the backdrop. Each backdrop to be tested should be defined as an Obstacle in the Level Editor.

You would use this condition to test whether an object was walking over a platform. If so, you could trigger the appropriate actions in your game.


Movement Conditions

The Movement Conditions test the speed, acceleration, or position of your objects on the screen.

Note:  Similar conditions are automatically provided for any external object which has a Movement menu.

Here's a list of the available movement conditions:

Is "object" stopped

Is "object" bouncing

Compare speed of "object" to a Fixed Value

Compare acceleration of "object" to a Fixed Value

Compare deceleration of "object" to a Fixed Value

Has "object" reached a node in its path

Has "object" reached the end of its path


Is "object" stopped

Is "object" stopped is triggered whenever an object has stopped moving. There are several reasons why the might have stopped. The object might have hit a background obstacle. If so, you can rebound the object in a new direction using a "bounce" action.

The object might have stopped because the user hasn't entered a command recently. You can react by prompting the user for another command.

Note: You can also reverse this condition with the Negate option to test whether an object is currently moving.


Is "object" bouncing

Is "object" bouncing tests whether the object is rebounding after a "Bounce" action. You can reverse this condition using the Negate option.

There are several possible for this condition. In a rebound game, you might want to play a sound clip when a ball hits a wall. In a pinball simulation, you could run an animation when the ball entered a trap. In a Platform game, you could make the character react when it crashes into an obstacle.

See:

Is "object" stopped


Compare speed of "object" to a Fixed Value

Compare speed of "object" to a Fixed Value tests if an object has reached a chosen speed.

You could use this feature in a racing game to impose a speed limit, or add skid effects when an object is moving too quickly. In an aircraft simulation, you could require a plane to be moving at a specific speed before it would leave the ground.


Compare acceleration of "object" to a Fixed Value

Compare acceleration of "object" to a Fixed Value tests the object's acceleration setting. Acceleration provides a measure of your object's increase in speed.

There are several uses for this condition. If you're controlling the object using the eight direction or platform options, you could speed up the object whenever it changes direction or falls through a hole. You can test this acceleration to see if the object has reached its maximum speed.

If you've assigned the object to a race-car movement, you can change the acceleration by pressing the up or down arrows.


Compare deceleration of "object" to a Fixed Value

Compare deceleration of "object" to a Fixed Value tests the rate of decrease in your object's speed.

This condition is mainly used for race-car objects. You can play a sample when the deceleration reaches maximum to generate a squeal effect for a brake or temporarily disable the steering with the Ignore Control action.


Has "object" reached a node  in its path

Has "object" reached a node in its path is only used if you've assigned your object to a path movement. Path Objects move in stages. Each stage is defined by an invisible stepping stone known as a "node".

This condition tells you that an object has reached one of these nodes in the path. The object will now change direction and start moving towards the next node. You can take the opportunity to fire a missile, or alter the animation effect as appropriate.


Has "object" reached the end of its path

Has "object" reached the end of its path is only available if you've assigned your object to a path movement. This condition tests if your path has reached the end of its movement pattern.

If so, you can use the Reverse action to retrace the object's steps or change the animation on the screen.


Animation Conditions

The Animation Conditions test the appearance of your objects on the screen. You can use them to test the animation type, or find out if an animation has reached a selected frame.

The available Animation conditions are:

Which animation is "object" playing?

Has an animation finished?

Compare current frame of "object" to a value


Which animation is "object" playing?

Which animation is "object" playing? tests if a particular animation sequence is being displayed by the object. Each active object can be assigned to up to sixteen different sequences or "types". These types are created using the Animation editor, and are given names such as "Walking" or "Stopped". You can move to a new animation by using the Change Animation Sequence action in your game.

Supposing you're producing a "Beat-em-up" game. Each attack style might have its own animation sequence. You could now control the opponent by choosing a random animation type. This condition would let you find the selected attack method and calculate the damage done to the player.

You can reverse this condition using the Negate option to test that the chosen animation is NOT being played. You might, for instance, test whether an object is not "Disappearing" before choosing a new movement.


Has an animation finished?

Has an animation finished? tests if your object has reached the end of its animation sequence. You can use this condition to destroy an explosion effect after it's finished or wait for a character's legs to stop moving before you change direction.

You can control the animation using the Stop Animation and Start Animation actions from your game.


Compare current frame of "object" to a value

Compare current frame of "object" to a value lets you trigger some actions when an object reaches a specific frame in the animation sequence.

You can use this condition to assign different actions to the different parts of an animation.

In a platform game, you could walk a character up a staircase. Each movement step would be triggered when the legs reached a chosen frame in the animation.


Position Conditions

Position Conditions test the location your objects on the display. You can test whether an object has left the screen, hit one of the edges, or moved to a specific location.

Similar conditions are available for any external object with a Movement option.

Here's a list of the possible Position Conditions:

Test Position of "object"

Compare X position to a value

Compare Y position to a value

Is "Object" getting close to window's edge


Test Position of "object"

Test Position of "object" tests whether your object is inside or outside the visible playing area.

You can test for the following possibilities:

An object enters or leaves to the left;

An object enters or leaves to the right;

An object enters or leaves from the top;

An object enters or leaves from the bottom;

An object is inside the playing area;

An object is outside the playing area;

Choose the condition by clicking an appropriate icon in the dialog box.

The arrows pointing inwards test if the object is entering from one of the edges.

The outwards arrows test if the object is leaving the playfield.

 The Inside icon tells you if your object is INSIDE the playing area.

 The outside icon tells you if your object is OUTSIDE the play area.

You can use these conditions to destroy a missile when it leaves the screen, starting a movement or animation when an object enters the screen, bounce a ball if it hits one of the borders, scroll the playfield when a character reaches one of the screen edges.


Compare X position to a value

Compare X position to a value tests whether your object has reached a horizontal screen position.

The coordinates start at zero, and are measured from the left of the current playfield. They increase as the object moves to the right, and become negative if the object moves off the left-hand side of the playfield.

You can use this condition to test the position of the bat in a rebound game, or the player in a platform game.

If you select the value using the Edit button, you can call up the Retrieve data from Object option to compare the X coordinates between several objects. You can find out whether an object is to the left or right of a chosen target.


Compare Y position to a value

Compare Y position to a value tests the object's vertical screen position.

The coordinates start at zero, and are measured from the top of the playfield. They increase as the object moves down, and become negative if the object moves above the playfield.

You can also use the Retrieve Data from Object option in the Expression Evaluator to test whether an object has passed above or below a selected target.


Is "Object" getting close to window's edge

Is "Object" getting close to window's edge tests if your object is a chosen distance from the edge of the screen window. This condition is useful for things like arcade games. If the player nears the side of the display, you can scroll the screen sideways to bring up the next section.

You can reverse this condition with the Negate option to trigger actions if the object is NOT a selected distance from the screen. The new condition will be true if the object is either within the chosen boundaries or totally outside them. The condition will stop your actions from occurring at the edge of the screen.


Direction Conditions

Direction conditions trigger your actions depending on the way your object is facing. You can Negate this condition to test if your object is NOT facing a selected directions.

Active Objects can be turned through thirty-two different directions. Each direction can have its own animation sequence. This animation sequence will be selected automatically whenever you turn an object in your game.

Choose the direction from a "clock-face". Each direction is represented by a dot on the dial. Click a dot to select a direction. An arrow will appear to show the direction has been selected. If you click several directions, they'll all be included in the test.

You can turn off a direction by clicking the dot again.

Note: Direction eight (down) is selected as a default direction. If you don't want to test this direction, you'll need to click on it with the mouse to disable this test.

These conditions could be used in an arcade game, to fire a different bullet depending on the direction of the player's ship. In a space simulation, you could control your object using a thrust system. Each direction would require a different set of actions to calculate the object's speed. In a platform game, you can make a character act differently for each direction.


Visibility Conditions

Visibility Conditions are used with the Make object invisible and Make object reappear actions. Invisible objects can be moved around and controlled as normal. They can be animated, tested for collisions, or destroyed. You can only detect these objects using events because you can't see them on the screen.

Invisible objects have a range of games. In a simulation, you can define hidden counters and arrays.

You can test whether an object is visible using two conditions:

Is "object" visible

Is "object" invisible


Is "object" visible

Is "object" visible tests that your object is currently being displayed on the screen. It reports whether the object has been previously hidden with the Make object invisible option.

Note: This condition has nothing to do with an object's actual position. If the object is outside the playing area, it might be technically "visible", but you won't be able to see it. If you want to test an object's location, you should use the "Test position" condition instead.


Is "object" invisible

Is "object" invisible tests whether you've hidden the object away using the Make object Invisible action.

Note:  If you want to test whether an object is outside the current play area, you should use Test position.


Pick or Count Conditions

Pick or Count Conditions are used with "clones" and "object groups". These conditions select your objects or count the number of copies in your game. They are similar to the New object conditions, except that they only apply to a single object type or group.

In order to use these options, you'll need to understand a bit of theory.

Each object can appear in a number of different versions or "clones". These clones are created whenever you copy an object onto the play area. Each version will share the same name, the same movement options, and the same events but will have a separate existence on the screen, and different Alterable Values. Clones are perfect for the attack waves in an arcade game, or the enemies in a platform game.

Object Groups are collections of objects which can share events, conditions, and actions. Each component is created individually in the Level Editor, and can be cloned several times. You can assign these objects to a group using an option from the object's Preferences menu.

You can now test the entire group using a single icon from the Event and Step Through. You can also control each object type directly using its own set of actions and conditions.

The Pick or count Conditions let you test the different versions of your objects. The available conditions are:

Pick "object" at random

Have all "object" been destroyed?

Compare to the number of "object" objects

Test for no "object" in a zone

Compare to the number of "object" in a zone


Pick "object" at random

Pick "object" at random selects a single clone at random and performs your actions on it. You can use this condition to choose a monster or character you wish to move, select an alien to fire a missile, or deal a random card in a card game.


Have all "object" been destroyed?

Have all "object" been destroyed? tests whether you've destroyed all the clones of a single object or group.

This condition is used in arcade games to see if a player has destroyed the aliens in an attack wave. You can now move to a new level, award a bonus, or start some new aliens moving from the top of the screen.


Compare to the number of "object" objects

Compare to the number of "object" objects compares the number of clones of the chosen object or group. You can use it to add bonuses when the player has done well, or signal a quick retreat if your attackers are getting destroyed.


Test for no "object" in a zone

Test for no "object" in a zone tests if the selected screen area doesn't contain any clones of the chosen object or group. You can define the test zone when you are setting up the condition. It can be positioned anywhere on the current playfield.


Compare to the number of "object" in a zone

Compare to the number of "object" in a zone tests the number of clones in a rectangular screen area. You can use it to stop your objects from entering the "busy" parts of the display. This lets you remove the clutter from an adventure or arcade game.

You can enter the zone when you are defining this condition from the Editor. It can be anywhere on the screen.


Values Conditions

The Values Conditions compare the object's values or Flags. You can test the contents against either a number or the attributes of another object.

The available Values conditions include:

Compare to Alterable Value A

Compare to Alterable Value B

Compare to Alterable Value C

Compare to Fixed Value

Is a Flag on?

Is a Flag off?

See:

Alterable Values

Flag Conditions


Alterable Values

Each active object has three Alterable Values and one Fixed (Internal) Value. The Alterable Values are labeled A, B, and C. These values can store whole numbers from -2,000,000,000 to +2,000,000,000. They can't deal with fractions such as 2/3 or 3.1.

Each value is tested using a separate condition:

Compare to Alterable Value A

Compare to Alterable Value B

Compare to Alterable Value C

Compare to Fixed Value

You can compare the value's contents using the following operations:

Name	Symbol
Equal	=
Less Than	<
Greater than	>
Less or Equal	<=
Greater or Equal	>=
Different	<>

These conditions are ideal for handling the fight scenes in RPGs, and War-games. You can compare the strengths, speeds, or powers of your objects.

When you're defining these conditions, you'll be asked to enter a value to be tested. If you'd like to read your value from an object function, you should click Edit, and click the Retrieve Data from an object button. You can now choose an function type from the dialog box.

Alterable Values can be changed at any time in your game. In the Event Editor, click a grid box under the icon for the object and choose Values from the pop-up menu. The following values actions are available:

Set Value replaces the value with something completely new.

Add to Value adds a number to the current contents.

Subtract from Value takes a number from the selected value.

Spread a value loads each version of an object with a different number.

You can test the value's contents using the functions:

Retrieve Alterable Value A - Value A("object")

Retrieve Alterable Value B - Value B("object")

Retrieve Alterable Value C - Value C("object")

Retrieve Fixed Value - Fixed("object")


Compare to Alterable Value A

Compare to Alterable Value A tests the contents of Alterable Value A. All the clones of your objects are tested together.

Each Alterable value can have a range from -2,000,000,000 to +2,000,000,000.


Compare to Alterable Value B

Compare to Alterable Value B tests the contents of Alterable Value B. All the clones of your objects are tested together.

Each Alterable value can have a range from -2,000,000,000 to +2,000,000,000.


Compare to Alterable Value C

Compare to Alterable Value C tests the contents of Alterable Value C. All the clones of your objects are tested together.

Each Alterable value can have a range from -2,000,000,000 to +2,000,000,000.


Compare to Fixed Value

Compare to Fixed Value tests the Fixed Value of an object. You can enter this value when you are creating the object in the Level Editor.


Flags Conditions

The Flags conditions test the status of an active object's "Flags". Each object can have its own set of up to 32 different Flags, numbered from zero to thirty-one. A Flag can have one of two values, on or off.

You could use these Flags in an adventure to test if an object was in the character's pocket. Set the flag to on to record that the character picked up an object.

You can test your Flags using two conditions:

Is a Flag on

Is a Flag off

You can change a Flag with:

Set Flag to On

Set Flag to Off

Toggle

You can read the contents of a Flag with:

Value of one of internal Flags - Flag("object",Flag number)

This reads a one for On, or a zero for Off


Is a Flag On

Is a Flag On tests whether a Flag is set to On. When you enter this condition, you'll be asked to choose a Flag to be tested. The available numbers range from 0 to 31.


Is a Flag Off

Is a Flag Off tests whether an object's Flag value is off. Each clone has its own set of thirty-two Flags. You can select a Flag by entering a number from zero to thirty-one.


Question and Answer Object Conditions for

Question and Answer Object Conditions read a selection from a question and answer object. Question and Answer Objects provide a simple way of asking the user multiple choice questions. They display a dialog box, and let the user choose an option by selecting a button on the screen. You can use Question and Answer Objects to choose a difficulty level, start a new game, or control your game options.

Display the dialog box using the Ask the question action in the Event Editor.

The user will now be able to click a button with the mouse to select the correct answer. The dialog box will disappear after the selection.

You can test the user's choice with:

Is Answer Correct?

Is Answer False?

Is Answer Equal to a certain value?


Is Answer Correct?

Is Answer Correct? triggers an action if the user has selected a single "correct" answer. You define the correct answer when you are setting up the object in the Level Editor.

Once the correct answer is detected, you can perform an action to increase the score or move to the next question.


Is Answer False?

Is Answer False? tells you that the user has entered the wrong answer to your question.

If the answer selected is incorrect, you'll need to take the appropriate action. In an educational game, you might provide a hint to the solution, and move to another question of a similar type.


Is Answer Equal to a certain value?

Is Answer Equal to a certain value? tests an individual button in the Question and Answer object.

Sometimes, there'll be no "correct" answer to a question. For example, supposing you wanted the user to choose the difficulty level in a game. The Question and Answer Object might display the options easy, medium, and hard.

Each button could activate a different event group, or move to a different level in your game.

You'd need to set one of these answers as correct when you are defining the Question and Answer Object. All three answers are equally valid, and they'll all need to be tested using an Is Answer Equal to a certain value? condition.


Counter Object Conditions

The only condition available for Counter objects is Compare Counter to a value

This condition provides a fast way of testing a counter object in your game. You can use this condition to generate "Switches" or "Triggers".

To compare the counter with an object's value, direction, or position, click the Edit button to display the Expression Evaluator. Click the Retrieve Data from an Object button to choose the appropriate function.


Functions

The Games Factory functions let you examine your objects during a game. You can use functions to read an object's attributes, generate random numbers, or even test the mouse.

Each function loads a particular value into your calculation. There are basically two types of functions:

General functions test the current level number, score, and generate random numbers. The General functions include:

Timer functions

Special functions

Player functions

Storyboard functions

New object functions

Object functions read an attribute directly from an object. The functions available depend on the type of object.

Active objects have functions for reading the speed, position, and Alterable Values.

Text objects let you read the Alterable String, or paragraph details.

Counter objects provide their current value.

Video for Windows objects give their location, frame number, and window size.

CD objects read the number of tracks, and tell you the current track being played.

You can enter your functions using two different methods.

Entering your functions from the Expression Evaluator

Entering your functions from the keyboard

See:

The Games Factory function names


Entering your functions from the Expression Evaluator

The Expression Evaluator is displayed whenever you click the Edit button in a dialog box. It's displayed from most dialog boxes that ask you to enter a number.

Once you've displayed the Expression Evaluator, you can select your function by clicking the Retrieve data from an object button. This will display a window with a full list of the available function types.

Each object is represented by an icon in the selector. Click the icon, and choose an option from the resulting pop-up menu. Your function will be added to the expression at the current cursor position. It will be shown as a name such as:

Random(1)

XMouse

Speed("Active object 1")


Entering your functions from the keyboard

Each function has its own unique name. You can type this name directly into an expression to use the function in your calculations. You'll find a list of the standard function names towards the end of this section.

Here are few guidelines:

1)	If a function requires additional information, it will be included in round brackets ().

2)	Numbers are entered directly. For example, Random(5).

3)	Text is entered between quotation marks "". For example, Score("Player 1")

4)	If there's more than one value, the information will be separated by commas. For example, Flag("Active object 1",5) means Flag number five of an active object called "Active object 1".

5)	Some names have a dollar $ sign at the end. These read strings of characters for use with a text object. The can be read from the Change Alterable String action.

Now for some examples of function names and expressions.

Names

Random(10)

timer

level

nobjects

Score("Player 1")

X("Active object 2")

Expressions

Random(6)+1

timer/1000

level+1

nobjects-1

Score("Player 1")-Score("Player 2")

The Games Factory is fairly lenient when it comes to accepting function names. It will recognize the function in lowercase, or CAPITALS. So "timer" could be entered as "Timer" or "TIMER".

If you make a mistake, The Games Factory will display a message asking you to try again. It's worth taking extra care with object and player names. These names must be typed in exactly as they appear. For example, if you wanted to type Score("Player 1") and entered Score("player 1"), you'd get an error message, as the "p" in "player" should be a capital. Similarly, a Speed("Active object 1") function is correct, but Speed("active Object 1") will generate an error.

If you need to test a lot of objects, its a good idea to give them sensible names in lower-case letters. This will make your games easier to read, and reduce the possibility of errors. To edit the object name, in the Level Editor, click the object with the right mouse button. Choose Edit Name & Icon from the pop-up menu.


An Introduction to The Games Factory function names

Here's a list of the standard functions included with The Games Factory.

Please note the following points:

1)	Each line is split into two sections. The left hand section contains the function name, and the right hand section gives the name used in The Games Factory menus.

For example, the Random number function is shown as:

Random(range)	Generate a random number

2)	The round brackets indicate values you need to include with the function.

a)	(type) means that you have to enter a number between the brackets. The type will be replaced by a description such as range, number, or Flag.

b)	("object") means that you need to enter an object name. This should be typed in precisely as it appears in the editor, with any capital letters in the correct places.

c)	("Player") means a player number, such as "Player 1", "Player 2", "Player 3", or "Player 4".

d)	("description") means some text. The description will tell you what it's for.

e)	("object",value) means that you need to enter both a name and a number separated by a comma.


Function List

Here’s a full list of all the built-in The Games Factory functions.

Special functions

Random	Generate random number

Global Value(identifier)	Retrieve a Global Value

Str$(value) 	Convert a string to a number

Val(“value”)	Convert a number to a string

appdrive$	Game drive name

appdir$	Game directory

apppath$	Game path name

appname$	Game filename

Timer functions

timer 	Timer Count in 1/1000 since start of level

hours 	Timer count, hours

seconds	Timer count, seconds

hundreds	Timer count, 1/100 value

minutes	Timer count, minutes

Player functions

Score 	Current score

players 	Current number of players playing

Storyboard Controls

level	Current number of level

players	Current number of players playing

Width 	Width

Height 	Height

X Left Playfield	 	X coordinate of left visible edge

X Right Playfield	X coordinate of right visible edge

Y Top Playfield 	Y coordinate of bottom visible edge

Y Bottom Playfield 	Y coordinate of top visible edge

Create object functions

nobjects 	Total number of objects

Mouse & Keyboard functions

XMouse 	Current X position of the mouse

YMouse	Current Y position of the mouse

Active Object functions

Speed("object")	Speed

Acc("object")	Acceleration

Dec("object")	Deceleration

X("object")	X coordinate

Y("object")	Y coordinate

X Left("object")	X-Coordinate of left edge

X Right("object")	X-Coordinate of right edge

Y Top("object")	Y-Coordinate of top edge

Y Bottom("object")	Y-Coordinate of bottom edge

Dir("object")	Current direction value

Image("object")	Current frame

Number("object")	Number of objects on the playfield

Value A("object")	Retrieve Alterable Value A

Value B("object")	Retrieve Alterable Value B

Value C("object")	Retrieve Alterable Value C

Fixed("object")	Retrieve Fixed Value

Flag("object", value)	Retrieve an Internal Flag

Text object functions

Paragraph("object")	Current number of paragraph

String$("object")	Alterable String

Paragraph$("object",p)	Text of a Paragraph

Counter object functions

value	Current value

Hiscore object functions

Hiscore value	Hiscore(“object”,slot)

Hiscore name	Hiscore name$(”object”,slot)

X Position of Hiscore table	Hiscore X pos("object")

Y Position of hiscore table	Hiscore Y pos("object")

Ini object functions

Get Value	Value of(“object”)

Get String	String of (“object”)

Edit object functions

Get text	Edit Text$("Object")

Get selection	Edit Select$("Object")

Get X position	Edit X Pos("Object")

Get Y position	Edit Y Pos("Object")

Get X size	Edit X Size("Object")

Get Y size	Edit Y Size("Object")

Button object functions

Selected Radio(“object”)	Radio Selected

Button X size(“object”)	X Size

Button Y size(“object”)	Y Size

Button X position(”object”)	X

Button Y position(”object”)	Y

Special Video for Windows functions

Video Frame("object")	Current frame number

Video Total Frames("object")	Total number of frames

Video Time("object")	Current time position

Video Total Time("object")	Total time

Last Error("object")	Last error number

Video X Size("object")	Horizontal size

Video Y Size("object")	Vertical size

Special QuickTime functions

Video Time("object")	Current time position

Video Total Time("object")	Total time

Video tracks("object")	Track Count

Video X Size("object")	Horizontal size

Video Y Size("object")	Vertical size

Last Error("object")	Last error number

Special FLI functions

Current Frame("object”)	Number of Current Frame

Current Frame("object")	Number of Frames

width("object”)	Width of Animation

height("object”)	Height of Animation

Frame duration("object”)	Frame duration

Special MPEG functions

Video Frame("object")	Current frame number

Video Total Frames("object")	Total number of frames

Video Time("object")	Current time position

Video Total Time("object")	Total time

Last Error("object")	Last error number

Video X Size("object")	Horizontal size

Video Y Size("object")	Vertical size

CD object functions

Track(“object”)	Number of current track

Maxtrack(“object”)	Number of tracks

PosInTrack(“object”)	Position in current track

Track Length(“object”)	Length of current track

Position(“object”)	Position in disc (1/1000s)

Length(“object”)	Length of disc(1/1000s)

Last Error(“object”)	Last error number

MCI object functions

Return Value

Return String

Last error number

Mixer object functions

Wave vol("Object")	Wave volume

Wave left vol("Object")	Wave left volume.

Wave right vol("Object")	Wave right volume

FM vol("Object")	Midi FM synthesizer volume

FM vol left("Object")	Midi FM synthesizer left volume

FM vol right("Object").	Midi FM synthesizer right volume

SQ vol("Object")	Midi square wave synthesizer volume

SQ vol left("Object")	Midi square wave synthesizer left volume

SQ vol right("Object")	Midi square wave synthesizer right volume

Picture object functions

picture name$(object,"string")	Get picture name

x original of("object")	Get picture original x size

y original of("object")	Get picture original y size

x screen of("object")	Get picture screen x size

x screen of("object")	Get picture screen y size


Special Functions

The Special functions let you create Random numbers and manipulate the values in a text object.

Random(range)	Generate random number

global value(id)	Retrieve a Global Value

Str$(value) 	Convert a number to a string

Val(“value”)	Convert a string to a number

appdrive$	Game drive name

appdir$	Game directory

apppath$	Game pathname

appname$	Game filename


Generate a random number

Usage: Random(range)

Generate random number reads a random number. This number is used for generating unpredictable values for your games and games. It's perfect for simulations, games of chance, and role playing games.

Normally, the numbers will start at zero. You can change this by adding an "offset" after the function name. Therefore, you could simulate a dice using Random(5)+1. This would generate a spread of numbers from 1 to 6.

Here are some more examples:

You could generate the attributes from 1 to 16 for a Role Playing character with Random(16).

You could choose a random speed for an attacker with Random(99)+1.

You could generate a random position with:

Random(640) for the X coordinate

Random(400) for the Y coordinate

These could be used with the Set X coordinate and Set Y coordinate actions to move your object to a random location.


Retrieve Global Value

Usage: global value(identifier)

Retrieve Global Value reads the contents of a Global Value. The "identifier" selects the value to be read. There are sixteen Global Values to choose from, they are numbered from zero to fifteen.

Global Values provide a fast way of storing vital information between levels.

See:

Change a Global Value

Compare to a Global Value


Convert a string to a number

Usage: Val(“value”)

Convert a string to a number converts a group of digits taken from a text paragraph or Alterable String into a number which can be loaded into a counter object or Alterable Value. If the characters don't fall between the range from 0 to 9, it will return a value of zero.


Convert a number to a string

Usage: Str$(value)

Convert a number to a string converts a number into a string of digits for use with a text object. You can read the number from either a counter value or an object's attributes. You can then load the digits into an Alterable String using a Change Alterable String action.


Game drive name

Usage: appdrive$

This reads the name of the current disk drive.


Game directory

Usage: appdir$

The reads the name and position of the game’s current directory. It doesn’t not include the drive letter it’s stored under.


Game pathname

Usage: appath$

This reads the entire path to the current game, including the filename it’s stored under. If you just want the path to its directory, you should using an expression such as:

appdrive$+appdir$


Game filename

Usage: appname$

Game filename returns the name of the current game.


Timer Functions

The Timer functions give you the elapsed time since the start of your game.

timer 	Timer Count in 1/1000 since start of level

hours 	Timer count, hours

seconds	Timer count, seconds

hundreds	Timer count, 1/100 value

minutes	Timer count, minutes

You can test the timer with an Is Timer Equal to a certain value condition.


Timer Count in 1/1000 since start of level

Usage: timer

Timer Count in 1/1000 since start of level reads the amount of time which has elapsed since the start of the level, in 1/1000's of a second.


Timer count, hours

Usage: hours

This function reads the number of hours the player has been stuck on the current level.


Timer count, seconds

Usage: seconds

This function reads the number of seconds since the start of the level. You can load information into a counter object to display the elapsed playing time on the screen.


Timer count, 1/100 value

Usage: hundreds

This function reads the number of 100ths of a second which have elapsed since the last full second. It cycles from 0 to 99 each second, and works like a stopwatch.


Timer count, minutes

Usage: minutes

This function reads the elapsed time since the start of your level in minutes. You can load this information into a counter object to display the current playing time. This information might be useful in an adventure game or simulation.


Storyboard Control Functions for

The Storyboard controls read the number of players, and the identity of the current Storyboard level. They also provide details about the screen area used to display your game. The available Storyboard Control functions are:

level 	Current number of level

players 	Current number of players playing

Width 	Width

Height 	Height

X Left Playfield	X coordinate of left visible edge

X Right Playfield	 X coordinate of right visible edge

Y Top Playfield	 	Y coordinate of bottom visible edge

Y Bottom Playfield	 Y coordinate of top visible edge


Current number of level

Usage: level

This function reads the number of the Storyboard level the user has reached. This number should not be confused with the animation level used in an active or FLI object.


Current number of players playing

Usage: players

This function reads the number of players in a game. You can assign an object to a player using the Moved by or Player options from the object's pop-up menu. The maximum number of players is four.


Playfield

The Playfield menu reads the dimensions of the current play area.

The available functions are:

Width 	Width

Height 	Height

X Left Playfield 	X coordinate of left visible edge

X Right Playfield 	X coordinate of right visible edge

Y Top Playfield 	Y coordinate of bottom visible edge

Y Bottom Playfield 	Y coordinate of top visible edge


Width

Usage: Width

This function reads the maximum width of the playfield in screen points (pixels). You can enter this value when you create the game level in the Storyboard Editor.

Note: The visible screen area can change when you resize the game window from the Desktop. You can read the true dimensions by defining a Windows Control object in your game.


Height

Usage: Height

This function reads the maximum height of your playfield. Each game level can have its own size which is setup in the Storyboard Editor.

Note: The visible screen area can change when you resize the game window from the Desktop. You can read the true dimensions by defining a Windows Control object in your game.


X coordinate of left visible edge

Usage: X Left Playfield

This function reads the playfield coordinates of the left-most point on the viewing window. This coordinate is usually zero. You can use this function to test whether a character is nearing the left hand side of your window.


X coordinate of right visible edge

Usage: X Right Playfield

This function reads the playfield coordinates of the far right of the window.


Y coordinate of bottom visible edge

Usage: Y Top Playfield

This function reads the playfield coordinates of the bottom line of the display window.


Y coordinate of top visible edge

Usage: Y Bottom Playfield

This function reads the playfield coordinates of the top window line.


New Objects Functions

The New Objects functions lets you count the number of active objects on the screen.

There’s just a single function:

Total number of objects

Usage: nobjects

nobjects reads the total number of active objects you are displaying. The number will change as you remove objects with Destroy or add new ones with Create.


Player Functions

The Player functions test the status of your score or lives objects. Each object can be assigned to a player number from 1 to 4 using the Player menu from the object's pop-up menu.

The available functions are:

Score("Player")	Current value of score

Lives("Player")	Current number of lives

Note: If you're entering these functions from the keyboard, you'll need to enter the player name between the brackets.

You can type one of four names: Player 1, Player 2, Player 3, or Player 4. These names must be entered exactly as they are shown. You can't type player 1 instead of Player 1, for instance.


Current number of lives

Usage: Lives("Player")

This function reads the number of remaining lives for the selected player. Before using this function you should create a Lives object from the Level Editor, and assign it to a Player number.

You can change the number of lives using the Set number of lives, Add to number of lives, and Subtract from number of lives actions.

You can test the number of lives with Compare to player's number of lives and When number of lives reaches zero.


Current value of score

Usage: Score("Player")

This function reads a player's current score. Before use this function, you'll need to create a Score object in the Level Editor, and assign it to the selected player.

You can change the score from your game using the Set Score, Add to score, and Subtract from score actions.

You can check the current score with a Compare to player's score condition.


Mouse & Keyboard Functions

The Mouse and Keyboard functions read the current location of the mouse pointer. The coordinates will changed whenever you move the mouse on the screen.

XMouse 	Current X position of the mouse

YMouse	Current Y position of the mouse

You can test the mouse using a range of conditions.

Check for mouse pointer in a zone

Check for a mouse pointer over an object

User clicks

Repeat while mousekey is pressed

User clicks within a zone

You can also assign the mouse directly to an Active object with the Mouse Movement option.


Current X position of the mouse

Usage: XMouse

This function reads the X coordinate of the mouse pointer. It's measured from the left hand side of the play area.


Current Y position of the mouse

Usage: YMouse

This function reads the Y coordinate of the mouse pointer as measured from the top of the playfield.


Active Object Functions

You can use Active Object functions to check your object's speed, position, or values using a simple set of options from the Expression Evaluator.

Here's a list of the available functions:

Speed("object")	Speed

Acc("object")	Acceleration

Dec("object")	Deceleration

X("object")	X coordinate

Y("object")	Y coordinate

X Left("object")	X-Coordinate of left edge

X Right("object")	X-Coordinate of right edge

Y Top("object")	Y-Coordinate of top edge

Y Bottom("object")	Y-Coordinate of bottom edge

Dir("object")	Current direction value

Image("object")	Current frame

Number("object")	Number of objects on the playfield

Value A("object")	Retrieve Alterable Value A

Value B("object")	Retrieve Alterable Value B

Value C("object")	Retrieve Alterable Value C

Fixed("object")	Retrieve Fixed Value

Flag("object", value)	Retrieve an Internal Flag


Movement Functions

The Movement functions read the speed, acceleration, and deceleration of your objects.

Speed("object")	Speed

Acc("object")	Acceleration

Dec("object")	Deceleration

Similar functions are also available for many multimedia  objects. Look for a Movement option from the pop-up menu for each object.


Speed

Usage: Speed("object")

This function reads how fast your object is moving. It returns a speed value from 0 to 100.

You can test the speed for your game using the a Compare speed to a value condition.


Acceleration

Usage: Acc("object")

This function reads the increase in your object's speed over time. It returns an acceleration value from 0 to 100.

You can change the speed with a Set Speed action.

You can test the acceleration using a Compare acceleration to a value condition.


Deceleration

Usage: Dec("object")

This function reads the rate at which the object is slowing down. It returns a value from 1 to 100. The larger the value, the faster your object will stop.

You can test the deceleration at any time with a Compare deceleration to a value condition.


Position Functions

The Position Functions read the location of your object on the screen. It's mainly used by active objects, but similar functions are also provided for any Multimedia object with a Movement option. The available Position Functions are:

X("object")	X coordinate

Y("object")	Y coordinate

X Left("object")	X-Coordinate of left edge

X Right("object")	X-Coordinate of right edge

Y Top("object")	Y-Coordinate of top edge

Y Bottom("object")	Y-Coordinate of bottom edge

You can test the current position using the Select Position, Compare X position, and Compare Y position conditions.

You can change the position with Select position, Set X coordinate, Set Y coordinate, and Swap position with another object.


X-Coordinate

Usage: X("object")

This function reads the horizontal position of your object. This position is measured from the far left of the play area to the hot-spot of your current object.


Y-Coordinate

Usage: Y("object")

This function reads the vertical position of your object as measured from its "hot-spot". The Y-Coordinate is set to zero at the top of the screen, and increases as the object moves downwards.


X-Coordinate of left edge

Usage: X Left("object")

This function reads the screen location of the left-most point in your object.


X-Coordinate of right edge

Usage: X Right("object")

This function reads the screen location of the right-most point in your object.


Y-Coordinate of top edge

Usage: Y Top("object")

This function reads the screen location of the top of your object.


Y-Coordinate of bottom edge

Usage: Y Bottom("object")

This function reads the screen location of the bottom of your object.


Animation Functions

The Animation Functions test the appearance of an object on the screen. There are two functions available:

Dir("object")	Current direction value

Image("object")	Current frame


Current direction value

Usage: Dir("object")

Dir reads the direction your object is presently facing. If the object is facing right, the value will be zero. It will increase by one as the object turns Counterclockwise, up to a maximum of 32.

You can check for a specific direction with the Compare Direction condition. You can enter a new direction using the Select Direction action. You can now reverse the direction with the following expression:

(Dir("object")+16) mod 32

Dir("object")+16 adds sixteen to turn the direction by 180 degrees.

"mod 32" is needed to reverse directions greater than 16. It works out the remainder from 32, and forces the new value into the correct range.


Current frame

Usage: Image("object")

This function reads the frame number currently displayed by your object. The frames are numbered starting from one.

You can test the frame number from your game using a Compare current frame to a value condition.


Count Functions

Usage: Number("object")

The Number function reads the number of clones of the object which are currently displayed on the screen.

You can add new objects with the Create and Shoot an object actions. You can remove objects using Destroy.


Values Functions

The Values menu reads one of the object's Internal Values. Each active object has its own set of three Alterable Values labeled A, B, and C, along with a fixed value entered in the Level Editor. Each object also has up to thirty-two different Flags for holding On or Off values.

The available Values functions are:

Value A("object")	Retrieve Alterable Value A

Value B("object")	Retrieve Alterable Value B

Value C("object")	Retrieve Alterable Value C

Fixed("object")	Retrieve Fixed Value

Flag("object",value)	Retrieve an Internal Flag


Retrieve Alterable Value A

Usage: Value A("object")

This function reads the current contents of your object's Alterable Value A.

You can test the value using a Compare to Alterable Value A condition. You can change it with Set Value, Add to Value, Subtract from Value, and Spread a number.


Retrieve Alterable Value B

Usage: Value B("object")

This function reads the contents of the object's Alterable Value B.

You can test the value using a Compare to Alterable Value B condition. You can change it with Set Value, Add to Value, Subtract from Value, and Spread a number.


Retrieve Alterable Value C

Usage: Value C("object")

This function reads the contents of the object's Alterable Value C.

You can test the value using a Compare to Alterable Value B condition. You can change it with Set Value, Add to Value, Subtract from Value, and Spread a number.


Retrieve Fixed Value

Usage: Fixed("object")

This function reads the contents of the object's Internal Value. You can set this up when you are defining your objects in the Level Editor.

You can test it using a Compare to Fixed Value condition.


Retrieve an Internal Flag

Usage: Flag("object",value)

This function reads a value from one of your object's Flags. Choose the Flag by entering a number from 0 to 31.

If the Flag is set to ON, you'll get a value of one.

If the Flag is OFF, you'll get a zero.

You can set a Flag using the Set Flag On, Set Flag Off, and Toggle actions. You can check its status with Is a Flag On or Is a Flag Off.


Text Object Functions

Text functions read the number of the currently displayed message paragraph, and the contents of either a paragraph or Alterable String. This information can be used with the Change Alterable String action to create new messages out of the existing paragraph text.

The available Text functions are:

Paragraph("object")	Current number of paragraph

String$("object")	Alterable String

Paragraph$("object",p)	Text of a Paragraph

You can also convert a number from a value with:

Str$(value)

Val(“value”)


Current number of paragraph

Usage: Paragraph("object")

This function reads the number of the current paragraph displayed by the Text object. The paragraphs are numbered from top to bottom, starting at one. You can change the paragraph using the Set paragraph, Next Paragraph, and Previous paragraph actions.


Alterable String

Usage: String$("object")

This function reads the contents of the Text object's Alterable String. You can using it in conjunction with the Change Alterable String action to create new messages out of existing text.

See:

Text of paragraph

Current number of paragraph

Convert number to a string

Convert String to a number


Text of a Paragraph

Usage: Paragraph$("object",p)

This function reads the Text of the paragraph number “p”. in your selected Text object. You can read this into an Alterable String using Change Alterable String, and display it on the screen.

See:

Alterable String

Current number of paragraph

Convert number to a string

Convert String to a number


Counter Object Functions

Counter Object functions read the contents of a Counter objects using the Current value function.

Current Value

Usage: value

This function reads the contents of your selected counter object. You can test your counter with a Compare counter to a value condition. You can change it using Set counter, Add to counter, and Subtract from Counter.


Picture object Actions

Picture objects can be controlled using the following actions:

New picture

New picture from selector

Image resize on

Image resize off

Visibility / Make object invisible

Visibility / Make object Reappear

Destroy


New picture

The New Picture action loads a new image from the selected filename. It's used to display pictures in slide-shows, adventure games, or storybooks. GF lets you load pictures in either: "BMP", "DIB", "RLE", "PCX", "LBM", or “IFF" format.

Enter the filename when you are defining the action in the Event Editor. Click the Browse button to select an image from a directory on the disk. You can test whether the file has loaded using the A Picture is Loaded condition. You can read its dimensions using the following functions:

picture name$(object,"string")	Get picture name

x original of("object”)	Get picture original x size

y original of("object")	Get picture original y size

x screen of("object")	Get picture screen x size

x screen of("object")	Get picture screen y size

See:

New picture from selector


New picture from selector

The New Picture from Selector action displays a standard Windows file selector that enables the user to choose a file directly from the disc. The filename can be entered in "BMP", "DIB", "RLE", "PCX", "LBM", "IFF", or "GIF" format.

After the file has been loaded, it will be automatically displayed at the current position of the Picture Object. You can test whether the operation was successful with the A Picture is Loaded condition. Read the picture details using the following functions:

picture name$(object,"string")	Get picture name

x original of("object”)	Get picture original x size

y original of("object")	Get picture original y size

x screen of("object")	Get picture screen x size

x screen of("object")	Get picture screen y size

See:

New picture


Image resize on

Image Resize On displays the picture in a resizable box which can be expanded or contracted by the user. If the option is enabled, you can resize the picture box by dragging the bottom corner with the left mouse button. If the new box is smaller than the original, the image will be reduced to fit. If it’s larger, the image will be expanded.

To enable Image Resize On, in the Level Editor, click the Picture Object with the right mouse button. Choose the Setup option from the pop-up menu and enable the Picture Resize check box.

See:

Image resize off

picture name$(object,"string")	Get picture name

x original of("object”)	Get picture original x size

y original of("object")	Get picture original y size

x screen of("object")	Get picture screen x size

x screen of("object")	Get picture screen y size


Image resize off

Image Resize Off turns the resize feature Off. The picture will now be displayed in the area you defined in the Level Editor.

If the box is smaller than the picture, only part of the image will be displayed. If it's larger, the empty areas will be filled with a solid block of the current background colour.

See:

Image resize off

picture name$(object,"string")	Get picture name

x original of("object”)	Get picture original x size

y original of("object")	Get picture original y size

x screen of("object")	Get picture screen x size

x screen of("object")	Get picture screen y size


Make Object Invisible

The Make Object Invisible action removes a Picture Object from the screen revealing any background areas. You can set this feature automatically in the Level Editor by enabling the Hide on start check box from the Picture Object Setup dialog box.

See:

Make Object Reappear


Make Object Reappear

The Show Picture action reveals the contents of a Picture Object on the screen. You can make the picture invisible either in the Level Editor, or using the Make Object invisible action in the game.


Destroy

The Destroy action removes the current object from the screen. Once an object has been destroyed, it is gone for the duration of your game. If you want to remove a picture from the screen but use it later in the game, you should use the Make Object Invisible action instead of Destroy.


Picture object Conditions

The conditions available for Picture Objects are:

A picture is loaded?

Is Visible?


A picture is loaded

A picture is loaded enables you to confirm that a file has been successfully loaded from the disk. You'd call this action after the user had chosen a file from a selector, or if images can change throughout your game, this action will confirm that the new picture was loaded correctly.


Is Visible

Is visible? will be “True” if the Picture Object is displayed on the screen. You can conceal your objects using either the Hide on Start option in the Setup menu, or with the Make object Invisible action in the Event Editor. You can display the objects again using the Make object Reappear action.


Picture object Functions

Picture objects can be examined using the following functions:

picture name$(object,"string")	Get picture name

x original of("object”)	Get picture original x size

y original of("object")	Get picture original y size

x screen of("object")	Get picture screen x size

x screen of("object")	Get picture screen y size


Get picture name

Usage: picture name$(object,"string")

This function reads the full path name of the currently loaded file. It can now be copied into an alterable string, or saved in an "INI file” using an "INI" object.

See:

Get picture original x size

Get picture original y size

Get picture screen x size

Get picture screen y size


Get picture original x size

Usage: x original of("object")

This function reads the width of the picture as it was originally stored on the disc.

See:

Get picture original y size

Get picture screen x size

Get picture screen y size


Get picture original y size

Usage: y original of("object")

This function reads the height of the picture as it was originally created.

See:

Get picture original x size

Get picture screen x size

Get picture screen y size


Get picture screen x size

Usage: x screen of("object")

The function provides the current width of the picture box used to display the image. If the Image Resize option is enabled, the user will be able to adjust this box with the left mouse button.

See:

Get picture original x size

Get picture original y size

Get picture screen y size


Get picture screen y size

Usage: y screen of("object")

The function provides the height of the picture object's display box. If the Image Resize option is enabled, the user will be able to adjust this box with the left mouse button.

See:

Get picture original x size

Get picture original y size

Get picture screen y size


QuickTime object Action

The Apple Macintosh has established itself as a leading system for Multimedia developers. These actions let you play Macintosh compatible Quick Time files using the official Apple libraries. A copy of the libraries will be installed automatically from The Games Factory set-up screen.

The video clip will be displayed in its own Viewport on the screen. You can choose the dimensions either from the Level Editor or using a simple action from the Object's menu.

Warning! If you're playing files from the Public Domain, you should restrict yourself to files with a ".MOV" extension. Self running ".EXE" programs will only work on an Apple Macintosh. They cannot be displayed on your PC.

Actions

General actions

Movement / Stop

Movement / Start

Movement / Set Speed

Movement / Set Maximum Speed

Movement / Wrap Around Play area

Movement / Bounce

Movement / Reverse

Position / Select Position

Position / Set X coordinate

Position / Set Y coordinate

Special QuickTime actions

Play / Forward

Play / Backward

Play / Step by step (in frames)

Play / A New file

Play / A New file via a file selector

Play / Looping On

Play / Looping Off

Stop

Pause

Resume

Set QuickTime Play position to. / Beginning

Set QuickTime Play position to. / End

Set QuickTime Play position to. / A Time Position

Set Volume

Tracks / Enable Video track

Tracks / Disable Video track

Tracks / Enable Sound track

Tracks / Disable Sound track

Tracks / Enable Text track

Tracks / Disable Text track

Tracks / Enable Music track

Tracks / Disable Music track

Tracks / Enable MPEG track

Tracks / Disable MPEG track

Size / Set Vertical Size

Size / Set Horizontal Size

Visibility / Make object Invisible

Visibility / Make object Reappear

Destroy


Play

The Play action is further divided into the following options:

Forward

Backward

Step by step (in frames)

A New file

A New file via a file selector

Looping On

Looping Off


Forward

Forward plays your QuickTime (.MOV) file forward from the current position. If you’re playing the clip for the first time, the movie will start from the beginning.

The clip is shown in it’s own Viewport on the screen. You can change the size either in the Level Editor, or using a Resize action in your game.

If you've enabled the Play bar option in the Setup dialog box, the user will be able to stop the clip by clicking the appropriate button in the game.

See:

Backward

Step by step (in frames)

Stop

Pause

Resume

Resize / Set size


Backward

Backward plays the movie sequence backward from the present position.

Note: The sound for clip will be reversed as well!

See:

Forward

Step by step (in frames)

Stop

Pause

Resume


Step by step (in frames)

Step by step (in frames) plays the movie a number of frames forwards or backwards. Positive values move the clip forward. Negative values play the clip in reverse. Your soundtrack will be automatically silenced during the playback.

You can use this action to generate fast forward and reverse buttons. These actions can be triggered at regular intervals using an Every event. You can control the playback speed by changing the time between each successive frame.

See:

Forward

Backward

Stop

Pause

Resume


A New file

A New file reads a chosen QuickTime file from the disk. You can enter this file from a selector when you are creating this action. QuickTime files have the extension ".MOV".

You would use this action in an adventure game to play a different sequence depending on the user’s decision.


A New file via a file selector

A New file via a file selector displays a file selector so that your user can choose a QuickTime ".MOV" file from the disc.

If you'd like to preview the video before you load it, hold down the left mouse button over the filename. A preview window will be appear displaying the video. Click the Play arrow to view the video in action.

You can test if the clip has been successfully loaded using the Check whether a file is opened condition.


Looping On

Looping On repeats the video from start to finish. You can stop the video with a Looping Off action.


Looping Off

Looping Off turns off the looping system. The movie will stop when it reaches the final frame.


Stop

Stop stops the QuickTime movie at the present frame. If you select Start, the video will be repeated again from the beginning.

See:

Forward

Backward

Step by step (in frames)

Pause

Resume


Pause

Pause freezes the movie at the current point. You can restart it again using the Resume action.

See:

Forward

Backward

Step by step (in frames)

Stop

Resume


Resume

Resume restarts a frozen sequence at the current frame. Use Resume after a Pause command, to continue the movie from where you left off.

See:

Forward

Backward

Step by step (in frames)

Stop

Pause


Set QuickTime Play position to

Set QuickTime Play Position To actions let you move to a new position in the QuickTime movie. You can Set QuickTime Play Position To:

Beginning

End

A Time Position


Beginning

Beginning jumps to the first frame of the Quick Time movie. The video will be stopped at the new position. You can run it using a Play, Forward action.


End

End jumps to the last frame of the QuickTime movie. If the video is already playing, it will be stopped.


A Time Position

A Time Position switches to a new part of your movie. If the video is already playing, it will be stopped.

Use this option to play a different part of movie depending on the user’s actions. Enter the new position as the elapsed time in milliseconds (1/1000 seconds) since the start of your clip.


Set Volume

Set Volume enables you to adjust volume of the soundtrack from within your game. Available settings range from 0 (silent), to 1023 (loud). The default setting depends on your video clip, but it's normally set to the maximum, 1023.


Tracks

The Tracks options allows you to enable or disable the tracks associated with the QuickTime video. The types of tracks are Video, Sound, Text, Music, MPEG. It is possible to enable or disable the following tracks by selecting the following options from the tracks menu:

Enable video track

Disable video track

Enable sound track

Disable sound track

Enable text track

Disable text track

Enable music track

Disable music track

Enable MPEG track

Disable MPEG track

The enable actions are used to play a particular track associated with the QuickTime video. The disable actions will stop playing a particular track. If you have disabled a track, it is possible to play it again using the corresponding enable action. For example, if you have disabled the Text track, use the Enable text track action to play it again.

It is possible to disable one track without affecting any of the other tracks. For example, you can disable the video track and still play the sound track and the text track.


Enable Video Track

This restarts a QuickTime video track after it's being disabled. The movie will jump directly to the current time position.


Disable Video Track

This stops the QuickTime video from being updated on the screen. It displays the current frame, and continues playing any sound, music, or text tracks. You can restart the video with "Enable Video Track"


Enable Sound Track

This restarts a QuickTime sound track after it's being disabled. The sound will continue from the current time position.


Disable Sound Track

This stops the sound track from being played through your loudspeakers. It's equivalent to pressing the "Mute" button on your TV. Note that there's no effect on any video, MPEG, music, or text tracks. You can restart the video with "Enable Sound Track"


Enable Text Track

This restarts some QuickTime subtitles after it's being disabled. The text  will continue from the current time position.


Disable Text Track

This stops the QuickTime subtitles from being updated on the screen. The current Text will freeze, and they'll be no effect on any video, MPEG, sound, or  music tracks. You can restart the subtitles with "Enable Text Track"


Enable Music Track

This restarts a MIDI music track after it's being disabled. The music will continue from the current time position.


Disable Music Track

This stops the MIDI compatible Music track from being played through your loudspeakers. It's equivalent to turning the volume down on your stereo. The music is still running in the background. You simply can't hear it.

Note that this option has no effect on any video, MPEG, sound, or text tracks. You can restart the video with "Enable Music  Track"


Enable MPEG Track

This restarts a MPEG movie track after it's being disabled. The movie will jump directly to the current time position. It's only used by hardware Movie cards, such as the ReelMagic system.


Disable MPEG Track

This stops some MPEG video from being updated on the screen. It displays the current frame, and continues playing any video sound, music, or text tracks. You can restart the video with "Enable MPEG Track"


Size

The Size options control the viewing window used to display your pictures. You can set the initial size in the Level Editor. The following Size options are available:

Set Horizontal Size

Set Vertical Size


Set Horizontal Size

Set Horizontal Size changes the width of your Viewport. The movie will stop for a moment while the window is being resized.


Set Vertical Size

Set Vertical Size changes the height of the Viewport. The movie will stop for a moment while the window is being resized.


Visibility

The Visibility menu lets you hide or show the movie clip on the screen. There are two possible actions

Make object Invisible

Make object Invisible hides the Viewport in the background. It lets you change the size or position of the video behind the scenes, without corrupting the display.

You can return the video to the screen with a Make object Reappear action.

Make object Reappear

Make object Reappear is used to replace a previously hidden video on the screen. It’s used after a Make object Invisible action to restore the Viewport to the display.


QuickTime object Conditions

Conditions test the status of a QuickTime object. You can use these conditions to perform a different series of actions for each part of the video clip. Your game will seem to react to the events in the video. Here are the available QuickTime conditions:

Conditions

Standard movement conditions

Collisions / Another object

Collisions / Overlapping another object

Collisions / Backdrop

Collisions / Is "object" over an obstacle background

Movement / Is "object " stopped?

Movement / Is "object " bouncing?

Movement / Compare Speed of "object" to a value

Movement / Compare Acceleration of "object" to a value

Movement / Compare Deceleration of "object" to a value

Movement / Has "object " reached the end of its path

Movement / Has "object " reached a node in the path

Position / Test position of "object"

Position / Is "object " getting close to window's edge

Position / Compare X position to a value

Position / Compare Y position to a value

Direction / Compare direction of "object "

QuickTime conditions

Is QuickTime object at start position

Is QuickTime object at end position

Mouse clicks within the QuickTime window

Compare to current time position?

Check whether a file is opened

Tracks / Video track present?

Tracks / Sound track present?

Tracks / Text track present?

Tracks / Music track present?

Tracks / MPEG track present?

Tracks / Video track enabled?

Tracks / Sound track enabled?

Tracks / Text track enabled?

Tracks / Music track enabled?

Tracks / MPEG track enabled?

Is Visible?


Is QuickTime object at start position

Is QuickTime object at start position tests if your QuickTime object is at the beginning. You could use this condition to play a piece of music, run a music clip from the CD, or start a complex animation sequence in the background when the QuickTime object begins.

See:

Is QuickTime object at end position


Is QuickTime object at end position

Is QuickTime object at end position tests if your QuickTime object is at the end. You could use this condition to loading another video sequence, wait for a command from the user, move to the next level, or stop the background music when the QuickTime object ends.

See:

Is QuickTime object at start position


Mouse clicks within the QuickTime window

Mouse clicks within the QuickTime window tests if the user has clicked in the video Viewport. Use this condition to assign the video as a control button, or drag it to another part of the screen.


Compare to current time position

Compare to current time position waits until a selected period of time has elapsed from the start of the video. You can now trigger the playing of a new audio track, or game demo.


Check whether a file is opened

Check whether a file is opened enables you test that there is a video sequence in memory, before you attempt to access it.


Tracks

The Tracks menu is used to test if the different tracks associated with the QuickTime video are present or enabled. It is possible to test for the following conditions:

Video track present?

Sound track present?

Text track present?

Music track present?

MPEG track present?

Video track enabled?

Sound track enabled?

Text track enabled?

Music track enabled?

MPEG track enabled?


Video track present?

Video track present? tests if the selected QuickTime video has a video track associated with it. Use this condition to assign the track to a control button, or assign an action to the video track.


Sound track present?

Sound track present? tests if the selected QuickTime video has a sound track associated with it. Use this condition to assign the track to a control button, or assign an action to the sound track.


Text track present?

Text track present? tests if the selected QuickTime video has a text track associated with it. Use this condition to assign the track to a control button, or assign an action to the text track.


Music track present?

Music track present? tests if the selected QuickTime video has a music track associated with it. Use this condition to assign the track to a control button, or assign an action to the music track.


MPEG track present?

MPEG track present? tests if the selected QuickTime video has an MPEG track associated with it. Use this condition to assign the track to a control button, or assign an action to the MPEG track.


Video track enabled?

Video track enabled? tests if the selected track is playing. Use this condition to assign the track to a control button, or assign an action to the video track.


Sound track enabled?

Sound track enabled? tests if the selected track is playing. Use this condition to assign the track to a control button, or assign an action to the sound track.


Text track enabled?

Text track enabled? tests if the selected track is playing. Use this condition to assign the track to a control button, or assign an action to the text track.


Music track enabled?

Music track enabled? tests if the selected track is playing. Use this condition to assign the track to a control button, or assign an action to the music track.


MPEG track enabled?

MPEG track enabled? tests if the selected track is playing. Use this condition to assign the track to a control button, or assign an action to the MPEG track.


Is Visible

Is Visible? will be True if the QuickTime object is currently being displayed on the screen. You can conceal these objects by enabling the Hide on Start check box in the Setup dialog box or by using the Make object Invisible action from your game. You can display the object again with the Make object Reappear action.


QuickTime Object Functions

QuickTime objects can be tested using a similar set of functions to Video For Windows objects. The only difference is that you can't read the Frame number, since QuickTime files don't provide a frame number. The functions available for QuickTime Objects are:

General functions

Movement

Speed("object")	Speed

Acc("object")	Acceleration

Dec("object")	Deceleration

Position

X("object")	X coordinate

Y("object")	Y coordinate

X Left("object")	X-Coordinate of left edge

X Right("object")	X-Coordinate of right edge

Y Top("object")	Y-Coordinate of top edge

Y Bottom("object")	Y-Coordinate of bottom edge

Special QuickTime functions

Video Time(“object”)	Current time position

Video Total Time(“object”)	Total time

Video tracks("object")	Track Count

Video X Size(“object”)	Horizontal size

Video Y Size(“object”)	Vertical size

Last Error(“object”)	Last error number


Current time position

Usage: Video Time(“object”)

This function reads the time in milliseconds (1/1000ths) since the start of the video clip.

See:

Total time


Total time

Usage: Video Total Time(“object”)

This function reads the total playing time of the video in milliseconds.

See:

Current time position


Track Count

Usage: Video Tracks("object")

This returns the number of track types available from the current file. You can check for the existence of particular track types with:

Video Track Present?

Sound Track Present?

Text Track Present?

Music Track Present?

MPEG Track Present?


Horizontal Size

Usage: Video X Size(“object”)

This function reads the width of the display window.

See:

Vertical Size


Vertical Size

Usage: Video Y Size(“object”)

This function reads the height of the display window.

See:

Horizontal Size


Last error number

Usage: Last Error(“object”)

This function reads an error code from the device. A value of zero indicates that there are no errors. Any other value indicates a problem.


Values-Expressions and Counters

This section provides useful information about the values, expressions, and counters you’ll be using in your The Games Factory games.

It doesn't matter if you're creating a fast action arcade game or a multimedia presentation, numbers are important!

The Games Factory provides you with special tools to help make your calculations easier. You can define a counter object, call up a function, or assign identification numbers to your Active Objects.

Once you've defined these numbers, you can test them in your game and perform an appropriate action. For example, in an arcade game, you might want to stop your players from firing when they run out of missiles. You could do this using a Condition in the Event Editor.


Types of values

Before we go any further, we'll briefly explain the "types" of values that can be used in your games.

Simple numbers.

The Games Factory only lets you deal with WHOLE numbers like 1, 3, 100, or 50000. You can not use fractions like 1.1, 3.14, or 100.6.

Your numbers can range between plus or minus two billion. That's a two with nine zeros after it (2000000000).

See:

Values

Strings of characters

Switches and Flags

Object Attributes


Values

Numbers don't mean anything by themselves in The Games Factory. Numbers only make sense when you associate them with something. For example, the number one, could be one missile, one card, or even one elephant. The meaning depends on the context.

The Games Factory gives your numbers names by assigning them to Counter Objects. Counter Objects store your numbers in the computer's memory. Define a Counter Object in the Level Editor, by clicking the Create New Object icon and clicking the Counter icon ( [image]).

When you define a Counter object, it will automatically be assigned a name by the system. The first Counter created will be named "Counter 1”, the second "Counter 2" etc. You can change these names using the Name & Icon Editor. We could use names like missile, card, or elephant to make reading the game easier.

Some Counters are provided for specific jobs in the game. They are used to remember things like the number of Lives, the player's Score, or the elapsed time.

Other Counters are linked to specific game objects. Each Active object has its own unique set of three Alterable Values. These alterable values are labelled A, B and C. You can't change the names of these values, but their content is up to you.


Alterable Values

Alterable Values are used for values that change throughout the course of a game. You could use alterable values to store the state of an object's shield in an arcade game, or hold the strength and dexterity of your characters in an adventure game.

Active Objects also have a Fixed Value. Fixed Values can only be entered in the Level Editor. You can't change these values in your game. Fixed values are great for numbers that don't change, such as the face value of a card.


Strings of characters

Strings of characters hold fragments of text or messages. They are used by Text Objects to hold a message, or by Multimedia Objects to store the name of the current movie file. You can load Strings of Characters with either a Text paragraph, read them from another object, load them with a number, or enter them from the keyboard using an Edit box object.

Strings are surrounded by double quotation marks:

"This is a string" is allowed but This is a string will generate an error.

You can also add strings together with a + (Plus) sign. For example:

"Test"+"Me" will create a single string containing "TestMe"

You can convert the string from a number using the Convert number to string option from the Special functions or type in the Str$ function in the Event Editor.

You can convert the characters back into a number with “Val” or Convert string to a number. This will only work if the string contains digits from 0 to 9.


Switches and Flags

Switches and Flags keep track of an event or situation. In an adventure, you might want to record the solution of particular puzzle.

For example, suppose you wanted your player to open a safe. You could do this by creating a Counter Object called "Safe". You could then assign a different number to the counter depending on the player's progress. A value of zero might show that the safe was still locked. A value of two could indicate that the safe had been successfully opened. A value of three might mean that the safe had been destroyed.

The same idea could be applied in an Educational game. In this case, you'd want to store the difficulty level entered by the user. You'd therefore create a Counter called "Mode" and change its value depending on the user's selection. If the user chose Easy, you'd set it to one. If the user entered Hard, you'd set it to two. You'd now could test this Counter to choose the questions that would be posed to the user.

Some switches are special. They can flip between two values, like the ON/OFF button on your computer. These are known as Flags. Flags can be either True or False.

Flags are used to represent doors, lights, traps, or possessions:

A door can be either open or shut.

A light can be ON or OFF.

A trap can be either armed or safe.

A possession can be either dropped or carried.

The Games Factory lets you assign these Flags to any Active object. Each Active object can have its own set of Flags, numbered from 0 to 31.

You can use flags to record the status of your objects during the game.

For example, imagine you wanted to list all of a character's possessions in an adventure. Whenever the user picked up an object, you'd set an appropriate Flag to True. You could now test this Flag for each object in your game. If it the test was True, you could display it on the screen in the appropriate position. If it was False you could move onto the next object.


Object Attributes

Objects don't remain still on the screen. They move, rotate, and animate in front your eyes. That's why they're so useful.

If you want to control these objects, you'll need to be able to react to their changing circumstances. Active Objects move around a lot, so you'll need take account of their Speed, Direction, and Coordinates. For other objects you'll want the position in a movie clip, the answer of your question, and the contents of a Timer.


General Functions

The Games Factory also includes additional functions to make creating your game easier. Functions are provided to generate random numbers, read the coordinates of the mouse pointer, or give the current frame number.


Entering The Games Factory Functions

You can compare functions using an Event and trigger an appropriate action if the event is True. You can also use functions as part of your calculations.

Either way, the principle is exactly the same. Click the Edit button to display the Expression Evaluator. Click the Retrieve Data from an object button and choose an object.


Using The Games Factory functions

Each function reads a value from a certain part of The Games Factory’s system. There are functions for reading the mouse coordinates, checking you objects, or examining the time.

We'll now show how you can use some of these functions in your own The Games Factory games.

We'll be giving a guided tour of the following functions:

Random: Generates random numbers

Xmouse: Reads the mouse coordinates

Ymouse: Reads the mouse coordinates

X: Reads an object’s position

Y: Reads an object’s position


Generating random numbers

The Random function generates a random number in the selected range. Enter this range using a dialogue box, or as part of the expression.

Here's an example for you to type in:

Random(5)

This function generates a random number from 0 to 5. The number is completely unpredictable, like the number you get when you roll a die. If you wanted to simulate a die, you'd enter the following expression into the evaluator.

Random(5)+1

This would produce a varying number between 1 and 6.

If you were creating a Role Playing game, you might want to generate random percentages. This could be achieved using a function such as:

Random(99)+1

It's rather like throwing a die. But you're not limited to just six sides. You can use as many sides as you like.

Random(31)+1

Produces an unpredictable direction value. You could enter the value into a Select direction action to turn an object to a random heading.

Random(640)

Random(480)

These functions would generate a random set of coordinates for an active object. You could move your object to the new position using the Set X coordinate and Set Y coordinate actions.


Reading the mouse coordinates

The XMouse and YMouse functions read the current playfield coordinates of the mouse pointer. You can use these functions to control an object using your own mouse system.

The following procedure will outline how this works.

Create a new object for your mouse pointer

1)	In the Level Editor, choose the an appropriate object from  the library menu. Click on the object and place it on the playfield.

2)	Click the Active Object with the right mouse button and choose Movement, Select Movement from the pop-up menu.

3)	Click Bounding Ball Movement from the Choose a Movement dialog box. Set the speed to zero by dragging the slider all the way to the left. Click OK to accept the new settings.

4)	In the Event Editor, click the New condition box. Double click the Timer icon ( [image]) and choose Every from the pop-up menu.

5)	Set the delay fairly short. Enter a value of 10 in the hundredths of seconds box. The higher the value you use, the slower the mouse will respond.

6)	Click the grid box under the Active Object 1 icon in the Event editor with the right mouse button. Choose Position, Set X coordinate from the pop-up menu.

7)	Enter Xmouse in the expression box. Click OK.

8)	Click the grid box under the Active Object 1 icon with the right mouse button. Choose Position, Set Y coordinate from the pop-up menu.

9)	Enter Ymouse in the expression box. Click OK.

Note: From now on, whenever you move the mouse in your game, the pointer object will move as well.

You might be wondering why this is so useful. After all, The Games Factory provides a perfectly good Mouse controlled movement option in the Choose a Movement dialogue box. What's the advantage of manipulating the mouse pointer by hand?

You will have a lot of control over the mouse. You can define several pointers at a time, and effortlessly choose between them. For example, you could store the pointer type in a Counter object. A value of one might mean an arrow shaped pointer, and a value of two could indicate an hourglass.

Each mouse mode could be controlled using its own event line:

Counter=1

Every 10/100ths

Counter=2

Every 10/100ths

You could now switch mouse modes by changing the contents of the Counter object. So, Set Counter to 1 would display an arrow, and Set Counter to 2 would display the hourglass.

Reading the position of an invisible mouse pointer

You can remove the mouse pointer from the screen at any time using a Hide action in your game.

This has no effect on the XMouse and YMouse functions. They'll still read the coordinates of your invisible pointer. You can use these coordinates to detect whether the user has moved the mouse in a selected direction. You can do this by comparing the mouse coordinates with the coordinates of the centre of the playing area. If the playfield is set to the standard 640 by 480, the centre will be at coordinates 320,240.

You can now test the mouse position using the following comparisons. Use the Compare X position to a Value condition and the Compare Y position to a Value condition. You can either enter the functions directly into the Expression Editor, or click the Edit button to select the function. Use the following functions:

XMouse is less than 320 means that the mouse is to the left of the center.

XMouse is greater than 320 indicates that it's been moved to the right.

YMouse is less than 240 means that it's been moved up.

YMouse is greater than 240 means that it's been moved down.

Enter the greater than or less than option in the top half of the dialogue box and enter the numerical value in the expression box at the bottom. Click OK to accept the settings.


Reading an objects position

The X and Y functions read the current coordinates of the location of your objects. The Games Factory provides different versions for Active Objects, Video for Windows movies, or FLI Animations.

X reads the object's X coordinate as measured from the left of the playfield.

Y reads the object's Y coordinate taken from the top of the playfield.

You can use these functions in several ways:

Moving an object in a chosen direction

The Games Factory lets you control your objects and move them using your own actions and events. The basic idea is simple. You assign your object to a Ball movement in the Level Editor, and set the initial speed to zero.

You can now move it at regular intervals using an "Every" condition. This triggers your actions at regular intervals throughout your game. Enter the delay in hundredths of a second. The higher the value, the slower the apparent movement.

You can move your object using the Set X coordinate and Set Y coordinate actions. These actions only allow you to move the object to a specific coordinate. How do you move them right, left, up, or down?

Read their existing coordinates using the X and Y functions. These can be typed directly into the edit box, or you can choose them from a menu using Expression Evaluator. Click the Edit button and click Retrieve Date from Object. You can now choose the object from the screen, and select the options from the Position menu.

If you're typing the functions directly, you'd use a format like:

X("object")

Y("object")

Where "object" would be replaced with the exact names of your own objects.

You can now move your objects using the following expressions:

X("object")+1 moves the object right.

X("object")-1 moves the object left

Y("object")+1 moves the object down.

Y("object")-1 moves the object up.

In the examples, we've added or subtracted one from the coordinates. If you wanted to move your objects faster, you could enter larger values. You could also store the speed in a Counter, and change this in your game.

If you'd used the Counter "myspeed", this would give the expressions:

Move Right

X("object")+Value("myspeed")

Move Left

X("object")-Value("myspeed")

Move Up

Y("object")+Value("myspeed")

Move Down

Y("object")-Value("myspeed")

You could also change the position by a random amount using the Random function or adjust it over time using a Minutes function.

Comparing the positions of two objects

You can compare the X and Y functions to find out the relative position of any two objects in your game.

Supposing you had two objects called "object 1" and "object 2". You could compare them using the following tests.

X("object 1") is less than X("object 2")

If this is True, then "object 1" is to the left of "object 2".

X("object 1") is greater than X("object 2")

Tests if "object 1" is to the right of "object 2".

Y("object 1") is less than Y("object 2")

Tests if "object 1" is above "object 2".

Y("object 1") is greater than "object 2"

Tests if "object 1" is below "object 2".

You can use these functions to create fancy targeting systems for games and simulations.

Note: The two objects don't have to be of the same type. Providing each object supports the X or Y functions, you can compare them with no difficulty. You could use this to test the locations of an Video for Windows movie and an active object such as a pointer.


String functions

Some functions also return a "String". A "String" is a list of the standard characters assigned to a Text object. Strings are entered between quotation marks:

"This is a string"

Here are a few examples:

"Message 1"

"Now is the Winter of our Discontent"

"The Games Factory"

You can test these strings using the Compare two general Values condition. However, both boxes MUST contain strings for this to work. You can't compare "forty-two" with "42".

You can also perform calculations with these strings. However, you can't use the standard mathematical operations. You can only add them using the "+" sign.

"A"+"b" gives "Ab"

If the number consists of a group of digits, you can convert this into a number using the "Val" function.

Val("34") gives 34.

If you try this with alphabetic characters, you'll get a value of zero:

Val(“thirty-four”)=0


The Expression Evaluator

The Expression Evaluator enables you to enter expressions and perform calculations. You can type a new expression from the keyboard or use the slider to enter numbers into the expression. The expression can include all the normal arithmetic operations and can be separated by brackets. It can also include The Games Factory functions.

Your calculations can include:

+	adds two numbers

-	subtracts the second number from the first

*	multiplies two numbers together

/	divides the first number by the second

Mod	 displays the remainder after division

( )	performs the contents of the brackets first

Del	deletes the current selection

The Mod key performs a remainder operation. It divides the first number by the second, and calculates what’s left over. For example, 7 mod.3 would be worked out as follows. The Games Factory would divide the 7 by 3. Since the result is not a whole number, you’d get a value of two with one left over. So 7 mod 3 would equal 1.

The brackets ( ) tell The Games Factory that a part of the expression has priority. So 10/(1+4) would equal two, as the expression would add the contents of the brackets first, before doing the division.

Check tests your expression to see if it makes sense. You'll get a message with Syntax error if the expression is incorrect.

Retrieve Data from an object displays The Games Factory functions. You can pick these functions from a dialogue box:

Each object will be represented by its own icon in the selection box, and will display its own menu of options.

Double click the object you want to retrieve data from. A pop-up menu will be displayed for you to choose a function. When you've selected the function, you'll be returned to the Expression Evaluator. Your function will be added to the evaluator at the current position like so:

Click OK to enter the expression into the Edit line or press Cancel to ignore the expression.

See:

Retrieve Data from object tutorial

Using Functions


Expressions and Calculations

Math on a computer works a little differently than math on a calculator. Therefore, it is worth going through a few of the general rules.

Each calculation can involve a series of "operators".

+	adds two numbers

-	subtracts the second number from the first

*	multiplies two numbers together

/	divides the first number by the second

Mod	 displays the remainder after division

( )	performs the contents of the brackets first

Del	deletes the current selection.

Most of these operators should be familiar to you, but Mod will probably be new. It displays the remainder after a division.

Here are some examples:

5 mod 2

5=2*2 with 1 left over. The result will be 1.

14 mod 3 = 2

14 = 4*3 with 2 remaining.

Mod displays the fractional part of a division. There are lots of games.

When you're typing in an expression, it's vital to know the order in which the calculations are performed. Supposing you had an expression such as: 1+2*3

This could be calculated in two different ways. If the operations were performed from left to right, the result would be equal to nine. The one would be added to the two to give three, and this would be multiplied by the final three to get nine.

1+2=3

3*3=9

If the "2*3" was performed first, then you'd get a value of seven instead.

2*3=6

6+1=7

In practice, the second approach is generally used. We've used this approach for The Games Factory expressions. The Games Factory performs your operations in the following order:

()

mod

/

*

+ and -

If you would prefer to use a different order. All you have to do, is enclose your operations between brackets. The contents of these brackets will always be performed first.

Lets take another example:

The expression 9/(1+2) will be equal to three. The Games Factory will perform the addition before the division because it is enclosed in brackets. It will start off by calculating (1+2) and then divide this value into the original nine.

Here are some more examples:

(1+2)*3 = 3*3 =9

12/(4+2) = 12/6 =2

(1+2)*(3+4) = 3*7=21

Each "(" needs to be matched by exactly one ")".If there are brackets within brackets, the inside brackets will be performed first.

For example:

(2*(3+5))/(1+1)

This would be performed in the order:

(3+5)=8

(2*8)=16

(1+1)=2

16/2=8

The (3+5) would be added together, multiplied by two, then divided by the result of 1+1. All expressions are calculated from left to right.


Retrieve Data from an object tutorial

Retrieve Data from an object lets you read values from a wide range of The Games Factory "functions".

Choose these functions from a dialogue box similar to the following:

Each icon represents a particular type of function in your game. Double click an icon and choose the function from a pop-up menu. Click OK to return to the Expression Evaluator. The Expression Evaluator will be loaded with a "Function name" such as:

Speed("Active object 1")

Once you've had a little experience with functions, you can type the names directly into the Expression Evaluator.

Here are few guidelines:

1)	If a function requires additional information, it will be included in round brackets ().

2)	Numbers are entered directly. e.g. Random(5).

3)	Text is entered between quotation marks "". e.g. Score("Player 1").

4)	If there's more than one value, the information will be separated by commas. e.g. Flag("Active object 1",5) means Flag number five of an active object called "Active object 1").

5)	Some names have a dollar $ sign at the end. These read strings of characters for use with a Text or Edit object. You enter them with the "Change Alterable String" action.

The available function types are:

The Special functions read Global Values and generate random numbers.

The Timer functions read the internal clock. They read the time since the start of your game.

The Storyboard functions read the current frame number and the size of the playing area. They also return the drive, folder, and filename of the current game

The Create object function read the number of Active Objects on the screen.

The Mouse and Keyboard functions read the present coordinates of the mouse pointer.

The Player functions read the Score and the number of lives for each of player in your game.

The object functions read a value from your selected objects. Each of the object types has its own, unique set of functions. You can read the speed, position, and direction of Active Objects. You can read the value of a Counter Object, and the text of a Text Object.

See:

Using The Games Factory functions

String functions


Video for Windows object Actions

You can use these actions to move your Viewport around the screen, or control the playback for your Video for Windows/clips.

Here’s a list of the available actions:

General actions

Movement / Stop

Movement / Start

Movement / Set Speed

Movement / Set Maximum Speed

Movement / Wrap Around Play area

Movement / Bounce

Movement / Reverse

Position / Select Position

Position / Set X coordinate

Position / Set Y coordinate

Special Video for Windows actions

Play / Forward

Play / Backward

Play / Step by step (in frames)

Play / A New file

Play / A New file via a file selector

Stop

Pause

Resume

Set AVI Play position to. / Beginning

Set AVI Play position to. / End

Set AVI Play position to . / A Frame number

Set AVI Play position to. / A Time Position

Size / Set Horizontal Size

Size / Set Vertical Size

Visibility / Make object Invisible

Visibility / Make object Reappear

Destroy


Play

The available Play actions are:

Forward

Backward

Step by step (in frames)

A New file

A New file via a file selector


Forward

Forward plays your file forwards from the current position. If you’re playing the clip for the first time, the movie will start from the beginning

If you've enabled the Play bar option from the set-up dialog box, the user will be able to stop the clip by clicking the appropriate button in the game.

See:

Backward

Step by step (in frames)

Stop

Pause

Resume

Resize/Set size


Backward

Backward plays the movie sequence backwards from the present position.

Note: The sound for clip will be reversed as well!

See:

Forward

Step by step (in frames)

Stop

Pause

Resume


Step by step (in frames)

Step by step (in frames) plays the movie a number of frames forwards or backwards. Positive values move the clip forward. Negative values play them in reverse. Your soundtrack will be automatically silenced during the playback.

You can use this action to generate fast forward and reverse buttons. These actions can be triggered at regular intervals using an Every event. You can control the playback speed by changing the time between each successive frame.

See:

Forward

Backward

Stop

Pause

Resume


A New file

A New file action reads a selected Video for Windows file from the disk. You can enter this file from a selector when you are creating this actions. Video for Windows files have the extension ".AVI”

You would use this action in an adventure game to play a different sequence depending on the user’s decision.


A New file via a file selector

A New file via a file selector displays a file selector so that your user can choose a Video for Windows ". AVI” from the disc.

If you'd like to preview the video before you load it, hold down the left mouse button over the filename. A preview window will be appear displaying the video. Click the Play arrow to see the video in action.

You can test if the clip has been successfully loaded using the Check whether a file is opened condition.


Stop

Stop stops the Video for Windows movie at the present frame. If you select Start, the video will be repeated again from the beginning.

See:

Forward

Backward

Step by step (in frames)

Pause

Resume


Pause

Pause freezes the movie at the current point. You can restart it again using the Resume action.

See:

Forward

Backward

Step by step (in frames)

Stop

Resume


Resume

Resume restarts a frozen animation sequence at the current frame. Use Resume after a Pause command, to continue the movie from where you left off.

See:

Forward

Backward

Step by step (in frames)

Stop

Pause


Set AVI Play position to

Set AVI Play Position To actions let you move to a new position in the Video for Windows movie. You can Set the AVI  Play Position To:

Beginning

End

A Frame Number

A Time Position


Beginning

Beginning jumps to the first frame of the Video for Windows movie. The video will be stopped at the new position. You can run it using a Play, Forward action.


End

End jumps to the last frame of the Video for Windows movie. If the video is already playing, it will be stopped.


A Frame number

A Frame number jumps directly to the chosen frame number and the video will be stopped at the new position. You start the movie playing again using a Play, Forward, or Play, Step by step (in frames) action.

You could call this option in an adventure or educational game to play a different sequence depending on the user's choice.

See

A Time Position


A Time Position

A Time Position switches to a new part of your movie. If the video is already playing, it will be stopped.

Use this option to play a different part of movie depending on the user’s actions. Enter the new position as the elapsed time in milliseconds (1/1000 seconds) since the start of your clip.

See:

A Frame number


Size

The Size options control the viewing window used to display your AVI file. You can set the initial size in the Level Editor. The following Size options are available:

Set Horizontal Size

Set Vertical Size


Set Horizontal Size

Set Horizontal Size changes the width of your Viewport. The movie will stop for a moment while the window is being resized.


Set Vertical Size

Set Vertical Size changes the height of the Viewport. The movie will stop for a moment while the window is being resized.


Visibility

The Visibility menu lets you hide or show the AVI clip on the screen. There are two possible actions

Make object Invisible

Make object Invisible hides the Viewport in the background. It lets you change the size or position of the video behind the scenes, without corrupting the display.

You can return the video to the screen with a Make object Reappear action.

Make object Reappear

Make object Reappear is used to replace a previously hidden video on the screen. It’s used after a Make object Invisible action to restore the Viewport to the display.


Video for Windows object Conditions

AVI Conditions test the status of a film clip. You can use them to trigger an action when you reach a selected point in your video. You could display a helpful diagram, wait for a user's command, or run an appropriate animation sequence.

These conditions test for a collision between two objects in your game. These objects can be anything from an FLI, to an Active object

It's important to place the collisions first in the Event Editor to allow them to be detected the moment they occur.

Standard movement conditions

Collisions / Another object

Collisions / Overlapping another object

Collisions / Backdrop

Collisions / Overlapping a backdrop

Movement / Is "object" stopped?

Movement / Is "object" bouncing?

Movement / Compare Speed of "object" to a value

Movement / Compare Acceleration of "object" to a value

Movement / Compare Deceleration of "object" to a value

Movement / Has "object" reached the end of its path

Movement / Has "object name" reached a node in the path

Position / Test position of "object"

Position / Compare X position to a value

Position / Compare Y position to a value

Position / Is "object" getting close to window's edge

Direction / Compare direction of "object"

Video for Windows conditions

Is AVI at start position

Is AVI at end position

Mouse clicks within the AVI window

Compare to current time position?

Compare to current frame position?

Check whether a file is opened

Is Visible


Is AVI at start position

Is AVI at start position tests if your Video for Windows object is at the beginning. You could use this condition to play a piece of music, run a music clip from the CD, or start a complex animation sequence in the background when the Video for Windows object begins.


Is AVI at end position

Is AVI at end position tests if your Video for Windows object is at the end. You could use this condition to loading another video sequence, wait for a command from the user, move to the next level, or stop the background music when the Video for Windows object ends.


Mouse clicks within the AVI window

Mouse clicks within the AVI window tests if the user has clicked in the video Viewport. Use this condition to assign the video as a control button, or drag it to another part of the screen.


Compare to current frame position

Compare to current frame position tests if the video sequence has reached a specific frame. If so, you can play an appropriate CD audio track, or stop the clip until the user enters a command.


Compare to current time position

Compare to current time position waits until a selected period of time has elapsed from the start of the video. You can now trigger the playing of a new audio track, or a game demo.


Check whether a file is opened

Check whether a file is opened enables you test that there is a video sequence in memory, before you attempt to access it.


Is Visible?

Is Visible? will be True if the AVI object is currently being displayed on the screen. You can conceal these objects by enabling the Hide on Start check box in the Setup dialog box or by using the Make object Invisible action from your game. You can display the object again with the Make object Reappear action.


Video for Windows Object Functions

You can test Video for Windows clips for a range of information. This information can be used as part of an event to trigger a series of actions in your application. Therefore, you can start a video playing when the video reaches a selected frame, or stop the clip at particular points in the sequence.

General functions

Movement

Speed("object")	Speed

Acc("object")	Acceleration

Dec("object")	Deceleration

Position

X("object")	X coordinate

Y("object")	Y coordinate

X Left("object")	X-Coordinate of left edge

X Right("object")	X-Coordinate of right edge

Y Top("object")	Y-Coordinate of top edge

Y Bottom("object")	Y-Coordinate of bottom edge

Special Video for Windows functions

Video Frame(“object”)	Current frame number

Video Total Frames("object")	Total number of frames

Video Time(“object”)	Current time position

Video Total Time(“object”)	Total time

Last Error(“object”)	Last error number

Video X Size(“object”)	Horizontal size

Video Y Size(“object”)	Vertical size


Current frame number

Usage: Video Frame(“object”)

This function reads the current frame number that is being displayed on the screen. Frame numbers start at zero.


Total number of frames

Usage: Video Total Frames("object")

This function reads the total number of frames in the AVI sequence.


Current time position

Usage: Video Time(“object”)

This function reads the time in milliseconds (1/1000ths) since the start of the video clip.

See:

Total time


Total time

Usage: Video Total Time(“object”)

This function reads the total playing time of the video in milliseconds.

See:

Current time position


Last error number

Usage: Last Error(“object”)

This function reads an error code from the device. A value of zero indicates that there are no errors. Any other value indicates a problem.


Horizontal Size

Usage: Video X Size(“object”)

This function reads the width of the display window.

See:

Vertical Size


Vertical Size

Usage: Video Y Size(“object”)

This function reads the height of the display window.

See:

Horizontal Size