My AGS Modules
AStar 0.4
Credits 0.1
Rolling credits
How to use: see the example room script linked below
DynamicObject 0.1
Generate overlay-based Objects dynamically and move them non-blocking
DynamicObject* o1, o2, o3;
function room_FirstLoad()
{
o1 = DynamicObject.CreateFromSprite(20, 20, 2060);
o1.Move(220, 50, 1.5, eNoBlock);
o2 = DynamicObject.CreateFromSprite(180, 20, 2060);
o2.Move(0, 150, 1.8, eNoBlock);
o3 = DynamicObject.CreateFromSprite(310, 160, 2060);
o3.Move(20, 80, 1.3, eBlock);
}
GotThere 0.5
Use a non-blocking, cancelable walk when interacting with areas
This module provides a single function:
bool WalkFace(int x, int y, CharacterDirection dir)
Use it like this:
function hSomeHotspot_Interact() {
if (WalkFace(123, 45, eDirectionLeft)) {
// what happens when the player reaches those coordinates goes in here
}
}
Jigsaw 0.4
Generate puzzle pieces from an image and let the player solve it by dragging & dropping
Jigsaw.Setup(int slot, int cols, int rows, int snapDistance, optional xOffset, optional yOffset)
slot: the sprite slot containing the puzzle image
cols, rows: the number of columns and rows of the puzzle grid
snapDistance: the maximum x and y distance in pixels from the correct position where a dropped piece will snap in place
xOffset, yOffset: move the top left corner to an arbitray point on screen