Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Yal's SoulsVania Engine

Metroidvania / Soulslike project for GameMaker:Studio · By Yal

Question about controls

A topic by SpotOnJ2K created Oct 29, 2023 Views: 104 Replies: 2
Viewing posts 1 to 2

Hi! I've been trying to find my way around this great project but I can't seem to pinpoint where exactly the gamepad controls are handled from. I'm wanting to add in an overhead section with a new player-controlled object that uses a modified version of the skeletal player character in the side-scrolling parts in this engine. Can you help me? Thanks! : )

Developer (1 edit) (+1)

It's input_blank to initially create all the variables used by the input system (so this goes in the Create event of the new object), then input_get to update them using whatever the current active input device is (so this would go in the start of the Step event, so the variables get updated before you do anything actually controlling the player).

As for how the input variables are used: the gist of it is that there's a pair of k_ / p_ variables for each action. k_l is the current status of the 'left' input, k_atkL is the left-hand weapon attack, and so on - there's a matching "p_" variable for each "k_" variable which is how many previous steps it has been pressed, this can be used to detect a press/release or e.g. holding down a button a certain time to charge an attack.

(The global array "global.input_key" is the mapping of which key/gamepad input is used for each action, this is what is updated when you remap the controls)

(+1)

Thank you so much, Yal!