I have fatigue, and as it drops it will affect other stats such as health. Tracking the drop is simple enough. However, if they recover with rest I need to remove the changes.
*label fatigue_1
*if (tm_1_fatigue>=90)
*gosub fat_adj_1
*set fat_1 "I'm full of pep and vigor"
*return
*if (tm_1_fatigue>=80)
*gosub fat_adj_1
*set fat_1 "I'm still full of pep"
*return
*if (tm_1_fatigue>=70)
*gosub fat_adj_1
*set fat_1 "Still plenty of vigor left"
*return
*if (tm_1_fatigue>=60)
*gosub fat_adj_1
*set fat_1 "I'm a little worn down but still good"
*return
*if (tm_1_fatigue>=50)
*gosub fat_adj_1
*set fat_1 "This starting to look like a long day"
*return
*if (tm_1_fatigue>=40)
*gosub fat_adj_1
*set fat_1 "I may need a break soon"
*return
*if (tm_1_fatigue>=30)
*gosub fat_adj_1
*set fat_1 "How about a break boss man?"
*return
*if (tm_1_fatigue>=20)
*gosub fat_adj_1
*set fat_1 "I don't feel so hot"
*return
*if (tm_1_fatigue>=10)
*gosub fat_adj_1
*set fat_1 "I feel sick to my stomach"
*return
*if (tm_1_fatigue>=1)
*gosub fat_adj_1
*set fat_1 "My head hurts and the room is trying to spin"
*return
*if (team_set)
*set phy_1 "You have not picked your team yet.
*return
*if (tm_1_fatigue<=0)
*gosub fat_adj_1
*set fat_1 "I hope you caught me as I pass out"
*return
*label fat_adj_1
*comment this is where I will track the changes
*comment so if they are under 40 then they will drop in hp 5 and fear will go up 7
*comment but if they recover then I need to remove the 5 and the 7
*comment I cannot use a temp var as this crosses over many goto_scenes.
*comment any thoughts how to handle this.
*comment thanks
@hahaha01357
Since the other number are in flux I cannot set them to a default number. As heath may go up 1 or 2 points with rest, but with out medical attention the number will not reset. But I wont to remove the modified number from resting and restoring fatigue.
*edit I think I have a thought will post if it works.
@Havenstone and @Nocturnal_Stillness
Ok not following sorry slow at times. So are you saying something like
*global_var
In a sense I did this with the hp_temp and fear_temp var
@CJW I did, just was not sure how to loop the information so the data could be retrieved with out setting it to a default number. I have now manage this with the last code I posted. I think we are on the same page just my not grasping what was being said.
@CJW My Dyslexia gets the better of me sometimes, it just clicked what you are saying. I worded it poorly I guess. Yes I made a global but I needed to treat it as a temp. The code seems to work well so I should be ok thanks.
@CJW temp is only good for that page correct. So when I leave the page the temp is reset. Well I need the temp to hold the number even when switching pages.
*edit I guess the problem lies in me calling it a temp, but it is a temporary number with a global state if that makes sense.
@lordirishdas I do see what you mean so I’ll stay out of this one.
An aside though: fat_check probably won’t work properly without a slight change -
*label fat_check
*if (fat_check)
*set tm_1_heart hp_temp
*set tm_1_fear fear_temp
*return ***this line is missing in your sample code***
*else
*return
Alternatively, just remove the *else in this case, since it serves no real purpose, and don’t indent the *return so it will fall to that line whether or not fat_check is true, i.e.