GenSetGlobalBounds


GenSetGlobalBounds width, height, edgeMode

width

Boundary width.

height

Boundary height.

edgeMode

The edgeMode determines what happens when a sprite crosses the boundary.

A set of constants are defined in the Game Engine Constants.inc file.

' Boundary Mode
Const Edge_Do_Nothing = 0
Const Edge_Kill_Sprite = 1
Const Edge_Wrap = 2
Const Edge_Rebound = 3
Const Edge_Stop = 4

include "Game Engine Constants.inc"

You may add the above include statement to any Basic program. It is located in the global include directory. The edgeMode constants are declared in this include file.

The global boundary is relative to the center of the screen. The boundary size is determined by the specified width and height.

When a sprite crosses the boundary the boundary event subroutine is triggered.


SetOnGenSpriteBoundsSub


Game Engine Overview


Event Triggered Subs






Become a Patron