-
Notifications
You must be signed in to change notification settings - Fork 0
TemplateVerbcoin
This template is a replacement for the previous VerbCoin template, with the aim of dropping legacy features and offering a simpler base to build upon.
The main changes are:
- There is no built-in mechanism for using timed clicks, so no press and hold of a mouse button is required anywhere
- Inventory is still right-click to open, but now BASS style controls are used within the inventory window
- No additional VerbCoin interfaces will be opened over the top of inventory items
- Rather than customize the action description per object/hotspot/character and allow actions to change based on context, the emphasis is on fixed actions with fallback to defaults (using unhandled_event)
As a general guide, left click on things to open the Verbcoin, right click to open the inventory window.
The script module functions are mostly to register the interface components used for displaying the VerbCoin and managing the inventory window.
Example:
// setup VerbCoin GUI and buttons
VerbCoin.InterfaceGui = gVerbCoin;
VerbCoin.RegisterButton(btnLook, eVerbCoinPositionNorth, eModeLookat, "Look at");
VerbCoin.RegisterButton(btnTalk, eVerbCoinPositionEast, eModeTalkto, "Talk to");
VerbCoin.RegisterButton(btnInteract, eVerbCoinPositionSouth, eModeInteract, "Use");
VerbCoin.RegisterButton(btnPickup, eVerbCoinPositionWest, eModePickup, "Pick up");
// select the inventory GUI and action label
VerbCoin.InventoryGui = gInventory;
VerbCoin.ActionLabel = lblAction;
// disable buttons where click events would be unhandled
VerbCoin.ButtonAutoDisable = true;
int VerbCoin.Radius
Sets the radius used when drawing the circle that renders the VerbCoin.
int VerbCoin.BackgroundTransparency
Sets the background transparency level (from 0 to 100) for the VerbCoin
int VerbCoin.BackgroundColor
Sets the background color (0 to 65535) for the VerbCoin.
int VerbCoin.BorderColor
Sets the border color (0 to 65535) for the VerbCoin
int VerbCoin.BorderWidth;
Sets the border width for the VerbCoin.
VerbCoin.OnClick(GUIControl* control, MouseButton button);
Since click handlers can currently only be implemented in the global script, this function is used to pass the event back into the VerbCoin module.
VerbCoin.RegisterButton(GUIControl* control, VerbCoinPosition position, CursorMode mode, String verbtext);
Registers a button for use with the VerbCoin. The design is currently 4-point, so valid positions are:
eVerbCoinPositionNorth
eVerbCoinPositionEast
eVerbCoinPositionSouth
eVerbCoinPositionWest
The cursor mode relates to the standard AGS cursor mode, which is used to determine the action performed. 'verbtext' is the text description of the action, e.g. if the mode being used is eModeInteract then a suitable description could be 'use'.
GUI* VerbCoin.InterfaceGui
Registers the GUI used for the VerbCoin.
GUI* VerbCoin.InventoryGui
Registers the GUI used for the inventory window.
Label* VerbCoin.ActionLabel
Registers the Label used to display text descriptions.
VerbCoin.Enable();
Enables the VerbCoin interface.
VerbCoin.Disable();
Disables the VerbCoin interface.
VerbCoin.IsEnabled();
Returns true if the VerbCoin interface is currently enabled, else returns false.
VerbCoin.Open();
Opens the VerbCoin interface (i.e. show its GUI).
VerbCoin.Close();
Closes the VerbCoin interface (i.e. hide its GUI)
VerbCoin.IsOpen();
Returns true if the VerbCoin interface is currently open, else returns false.
VerbCoin.CleanUp();
Deletes the dynamic sprite which is used in rendering the VerbCoin user interface. This would typically only be done immediately before exiting the game, in-order to suppress warnings about dynamic sprites still being allocated.
bool VerbCoin.ButtonAutoDisable
Sets whether VerbCoin buttons should be disabled, if clicking them would result in an unhandled event.
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