-
Notifications
You must be signed in to change notification settings - Fork 0
EventTypes
The following events are available in the "Events" section of the Properties Window (when clicking the lightning bolt icon).
Player stands on hotspot
occurs repeatedly while the player character is standing on the hotspot.
Look at hotspot
occurs when the player clicks on the hotspot while in the "Look" mode (cursor mode 1).
Interact with hotspot
occurs when the player clicks on the hotspot while in the "Interact" mode (cursor mode 2).
Use inventory on hotspot
occurs when the player clicks on the hotspot while in the "Use inventory" mode (cursor mode 4). You can use the player.ActiveInventory property to distinguish which item they used.
Speak to hotspot
occurs when the player clicks on the hotspot while in the "Talk" mode (cursor mode 3).
Any click on hotspot
occurs when the player clicks on the hotspot in any cursor mode (except Walk). This allows you to add extra modes like smell, taste, push, pull, and so on. This event also occurs as well as the other event for the Look, Interact and Talk modes.
Mouse moves over hotspot
occurs repeatedly while the mouse cursor is over the hotspot. You can use this to highlight the cursor, and for other various effects.
Look at object
occurs when the player clicks on the object while in the "Look" mode (cursor mode 1).
Interact with object
occurs when the player clicks on the object in the "Interact" mode (cursor mode 2).
Speak to object
occurs when the player clicks on the object in the "Talk" mode (cursor mode 3).
Use inventory on object
works like "Use inventory on hotspot" - see that description (above) for more information.
Walk off left
occurs when the player character walks off the left edge of the screen.
Walk off right
occurs when the player walks off the right edge of the screen.
Walk off bottom
occurs when the player character walks off the bottom edge of the screen.
Walk off top
occurs when the player character walks off the top edge of the screen.
First time enters room
occurs the first time the player enters the room. This event occurs AFTER the screen has faded in, so it allows you to display a message describing the scene.
Player enters room (before fade-in)
occurs just after the room is loaded into memory. This event occurs every time the player enters the screen, and it happens BEFORE the screen has faded in, which allows you to change object graphics and do other things to the screen which the player won't notice.
NOTE: This event is ONLY meant for adjusting things such as object and character placement. Do NOT use this event for any sort of automated intro to the room - use the "Enters Room After Fade In" event for that instead.
Repeatedly execute
occurs repeatedly on every interpreter cycle. The normal game speed is 40 cycles per second, so this event occurs about every 25 milliseconds.
Player enters room (after fade-in)
occurs every time the player enters the room, AFTER the screen has faded-in. Suitable for displaying text descriptions and so on, that you want the player to see.
Player leaves room
occurs when the player leaves the screen, just before the screen fades out.
Look at inventory
occurs when the player clicks on the inventory item while in the "look" mode.
Interact with inventory
currently, because the Interact mode selects the inventory item, this event can only be triggered by manually calling the InventoryItem.RunInteraction script function (i.e. you have to use the Handle Inv Clicks in Script option).
Speak to inventory
only applies to the LucasArts-style inventory, occurs when the player clicks the Talk icon on the inventory item.
Use inventory on inv
occurs when the player uses another inventory object on this one. You
can use the
player.ActiveInventory property
to distinguish which item they used.
This event allows the player to combine items, and so on. For example,
if they had picked up a laptop computer and a battery separately, then
you could use this to allow them to insert the battery into the
computer.
Other click on inventory
only applies to the LucasArts-style inventory, occurs when the player clicks any other cursor mode (apart from look, talk and use_inv) on the item.
Look at character
occurs when the player clicks on a character while in the "look" mode.
Interact with character
occurs when the player clicks on a character while in the "interact" mode.
Speak to character
occurs when the player clicks on a character while in the "talk" mode.
Use inventory on character
occurs when the player uses an inventory object on a character. This event could be used to allow the player to give items to characters.
Any click on character
occurs when the player clicks any other cursor mode (apart from look, talk and use_inv) on the character.
While player stands on region
occurs repeatedly while the player character stands on this region
Player walks onto region
occurs when the player moves from another region onto this one. Will also activate on whichever region they start on when they enter the screen.
Player walks off region
occurs when the player leaves the current region. Does not occur if they go to a different room.
Getting Started in AGS
Editor Reference
- Music and sound
- Distributing your game
- Backing up your game
- The text parser
- Translations
- Global variables
- Custom Properties
- Plugins
- Lip sync
- New Game templates
- Debugging features
- Auto-number speech files
- Integration with Windows
- Source Control integration
Engine
Scripting
- Scripting tutorial part 1
- Scripting tutorial part 2
- Pointers in AGS
- Calling global functions from local scripts
- The script header
- String formatting
- Multiple Scripts
- Understanding blocking scripts
- Dynamic Arrays
- Extender functions
- Game variables
- Predefined global script functions
- repeatedly_execute (_always)
- Custom dialog options rendering
- Built-in enumerated types
- Script language keywords
- AudioChannel functions and properties
- AudioClip functions and properties
- Character functions and properties
- DateTime functions and properties
- Dialog functions and properties
- DialogOptionsRenderingInfo functions and properties
- DrawingSurface functions and properties
- DynamicSprite functions and properties
- File functions and properties
- Game / Global functions
- GUI functions and properties
- GUI control functions and properties
- GUI Button functions and properties
- GUI InvWindow functions and properties
- GUI Label functions and properties
- GUI List Box functions and properties
- GUI Slider properties
- GUI Text Box functions and properties
- Hotspot functions and properties
- Inventory item functions and properties
- Maths functions and properties
- Mouse functions and properties
- Multimedia functions
- Object functions and properties
- Overlay functions and properties
- Palette functions
- Parser functions
- Region functions and properties
- Room functions
- Screen functions
- Speech functions and properties
- String functions
- System functions and properties
- Text display / Speech functions
- ViewFrame functions and properties
Working on Legacy games
Upgrading from a previous version
- Upgrading to AGS 2.7
- Upgrading to AGS 2.71
- Upgrading to AGS 3.0
- Upgrading to AGS 3.1
- Upgrading to AGS 3.2
- Upgrading to AGS 3.3
- Upgrading to AGS 3.3.5
- Upgrading to AGS 3.4
- Upgrading to AGS 3.4.1
Legal Notice
Getting in touch