You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michael Dearman edited this page Apr 15, 2017
·
3 revisions
Before a command can be executed, it first needs to be declared in the create event for obj_console.
Commands are executed in the User Defined 0 event for obj_console. The submitted command string is stored in the variable command, and submitted arguments are stored in the arg array.
The easiest way to handle executing commands is with the switch statement, like this:
switch(command) {
case "score":
score = arg[0];
break;
case "create_powerup":
instance_create(arg[0],arg[1],obj_powerup);
break;
}