Froglord1 Im making a game with multiple stat bars,(Health,hunger,etc) and im wondering how to put that widget with the stat bars in the corner(particulary the top left one) of the game at all times?
Slayer Froglord1 In the widget main settings, ensure the position is set correctly. Then in your startup/starting script, use show_widget() to open it when the game starts.
Froglord1 im so sorry, but i have another question,that being,how can i make the hunger and sanity stat slowly go down over time?
Slayer Froglord1 For constant repeating actions, one way would be a while loop started by the startup script. while true do player.stat["hunger"] -= 1; player.stat["sanity"] -= 1; wait(5); // lose 1 hunger and sanity every 5 seconds end;
Froglord1 this is hooked up to a execute script in the starting script,as it will mess up the load map and such if i inseert the script there
Slayer Froglord1 If the widget is always visible then you will need to write the new value to the relevant widget element after changing it too. Add the following to the while loop. widget["widget_id"].element["0001"].value = player.stat["hunger"]; // element number/ID needs to be the part of the hud that holds hunger
Froglord1 wait i think i figured out the problem,how can i make it so my max hunger is a set number of like 25 or something like that?
Froglord1 this is the settings,each the same besides the name of the stat,and the last two are images of the customv stats,sanity and hunger are the same,with different names.
Slayer Froglord1 have you tried adding the "update" code to the while loop? widget["widget_id"].element["0001"].value = player.stat["hunger"]; Sometimes, especially if a widget is always on screen, you have to "force" the value to update.