Skip to main content

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

Custom script: Limit Gauge

A topic by Kylihim created Sep 02, 2022 Views: 319 Replies: 5
Viewing posts 1 to 3

How do I need to add a limit gauge to my character?

Developer

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);
callback_add(callback_hud, limit_gauge_hud, CALLBACK_TYPE.permanent);
2. Change the player_hud_type macro to HUD_TYPE.legacy (so you can see the gauge on the HUD)
3. Change the character_static_attacks macro to false
4. Make sure the script "limit_gauge_passive" is spelled correctly (looks like I a made a typo in 1.3.2 that wasn't in 1.3.1, so double check that)

Ow... I started on beta 0.7.1: This feature, even

    //Custom Scripts

    custom_script = custom_limit_gauge;

    hud_script = hud_limit_gauge;

does an Code Error :(

Developer

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;
    }

Wait... where is the character_static_attacks macro?

Developer

Depending on the version you're using, you may not have (or need to set) that macro.