How do I need to add a limit gauge to my character?
Make your own Platform Fighter in GameMaker! · By
1. Add this code to the "custom scripts" section of the character init script you want to give a limit gauge:
callback_add(callback_passive, limit_gauge_passive, CALLBACK_TYPE.permanent);2. Change the player_hud_type macro to HUD_TYPE.legacy (so you can see the gauge on the HUD)
callback_add(callback_hud, limit_gauge_hud, CALLBACK_TYPE.permanent);
Put this code at the start of custom_limit_gauge:
//Variables if (!variable_struct_exists(custom_script_struct, "limit_gauge")) { custom_script_struct.limit_gauge = 0; }
And this code at line 8 of hud_limit_gauge:
//Variables if (!variable_struct_exists(_player.custom_script_struct, "limit_gauge")) { _player.custom_script_struct.limit_gauge = 0; }