Menu

Button Object

Frank Force

A button object is a game object that can activate other objects when touched by referencing their unique IDs. In it's default state it works like a button but can also be configured to work like a toggle switch.

Buttons are linked to other objects via unique object IDs. You can even link buttons to other buttons!

Button Object

Object Attributes

Parameter Default Function
image sprites8x8 References one of the [Images] that Wildflower is configured to recognize
frameOff 64 The off frame in that image when counted from the top left (-1 if invisible)
frameOn -1 The on frame in that image when counted from the top left (-1 if invisible)
reverseSignal 0 Boolean value used to reverse the trigger signal that is sent
isToggle 0 Boolean value controls can be toggled or automatically turns off when not touched
halfHeight 1 Boolean value controls if the button is half height or fills up the whole tile
autoOffTime 100 Time in milliseconds to wait before turning off after being touched
sound 14 (button) sound Id of the Sound Effect to play when activated
#triggerIDs List of object IDs to trigger when button is activated.
#message Message must start with a # symbol, and displays when touched by the player

Example Attribute Strings

#2355

This is a button that triggers the object with ID 2355 when triggered. Note that you must put the # symbol to skip over the earlier parameters in the button attributes and that you will need to change the id to an id of an object in your scene.

sprites8x8 64 -1 1 #2355

This is a button that is set to reverse signal.

sprites8x8 68 72 0 1 0 #2355

This is a button that triggers the object with ID 2355 when triggered. Note that you must put the # symbol to skip over the earlier parameters in the button attributes and that you will need to change the id to an id of an object in your scene.

sprites8x8 68 72 0 1 0 #2355

Lever that uses frames 68 and 72 in the sprites8x8 image and is a toggle switch so it stays on when touched. Also the halfHeight parameter is 0 to indicate that it takes up the full space of the tile.

sprites8x8 76 77 0 0 0 0 0

A hidden spike which you can trigger via a [Trigger Box Object]


Related

Wiki: Crate Object
Wiki: Door Object
Wiki: Images
Wiki: Objects
Wiki: Sound Effects
Wiki: Static Object
Wiki: Trigger Box Object

MongoDB Logo MongoDB