dbg_drop_down

This function creates a drop down control for an integer value within the current debug section.

The values and names for the drop down are specified as a comma-delimited string, where integer values can optionally be specified after a colon symbol. For example "Zero,One:10,Two:20" creates a 3 entry drop down that will set the variable to the value 0, 10 or 20, depending on the selected option.

NOTE This debug control spans two columns.

 

Syntax:

dbg_drop_down(ref, specifier[, label]);

ArgumentTypeDescription
refReferenceA reference to the variable, created using ref_create
specifierStringA comma-delimited string listing the options and, optionally, the integer value to use (e.g. "Zero,One:10,Two:20")
labelStringOPTIONAL A label to show next to the dropdown

 

Returns:

N/A

 

Example:

Create Event

difficulty = 1;
var _ref = ref_create(self, "difficulty");
dbg_drop_down(_ref, "Easy:0,Normal:1,Hard:2,Impossible:3");

The code above first set an instance variable difficulty that stores the game's difficulty level. It creates a reference to the variable using ref_create and creates a dropdown control using dbg_drop_down to change the variable through that reference. The specifier lists the four difficulty levels as "Easy:0,Normal:1,Hard:2,Impossible:3".