For the walk state of
obj_vlad, the player will use the left and right keyboard arrows to move the character. To accomplish this, scripts will be written into the following events:
Similar to most Create events, the Create event of
obj_vlad will handle defining important instanced variables. The following code assigns values to each of these variables that we need to go from the idle state to the walking state and vice versa:
/// Variable initialization for character // The state of the character used within the update state. state_id = state_idle; // Has the player entered a new state. entered_new_state = false; ...