i want to be able to remove gear from the stat screen as well as be able to add it
Yep, many of us want to be able to do that, but that’s hard to do right now.
This is accurate.
Would subroutines help, maybe? With a reset at the the start, of course, to nullify the strings, then just re-calculate them?
Idk maybe ill have to look at the code and see how i can put subroutines in but right now i need to sleep so i can wake up on time to go to work.
night everyone
Rest well! We’ll continue working on this conundrum in your absence.
Yep, you can reset both the “glued” variable or the “target” variable, depending on your needs.
In fact, I use this kind of mechanism on my WIP. Needless to say, it works wonderfully as a bullet-list creator.
I am intrigued. I’m not sure I understand the concept, though.
Would you care to enlighten me?
Ehh… yeah, I guess
It’ll probably sound convoluted, but feel free to ask again to clear things up.
So, I have this snippet of my bullet-list subroutine
*label log
*params statlog addlog
*set {statlog} (("• "&addlog)&"[n/]")&{statlog}
*return
It works by having a “parent string variable” reffered to [statlog] where you can slap the extra strings to via the “sticky string variable” [addlog]
The • bullet and the [n/] tag cooperate to create the bullet list.
well i think ill just go with the following code
*fake_choice
#ill take the smg
you decide to take the suppressed smg
*temp inventory
*set inventory ""
*temp smg_suppressed true
*temp stun_grenade false
*temp comma false
*if (smg_suppressed != false)
*set inventory "smg suppressed"
*set comma true
*if (stun_grenade != false)
*if comma
*set inventory &", "
*set inventory &"stun grenade"
*set comma true
inventory: ${inventory}
*fake_choice
*selectable_if (smg_suppressed) #shoot
#damn i can do a thing
I mean its gonna look ugly as hell buuut its the best my amateur ass can do at the moment
also feel free to try it out if you want
Few tips for your code. I’ll try to modify it and point out what things are changing.
*fake_choice
#ill take the smg
you decide to take the suppressed smg <<Indent this line below the #Option>>
*temp inventory
*set inventory ""
*temp smg_suppressed true
*temp stun_grenade false
*temp comma false
*if (smg_suppressed != false)
*set inventory "smg suppressed"
*set comma true
*elseif (stun_grenade != false) <<switch *if to *elseif>> <<It actually works either way, but for beginners, I recommend going *elseif first>>
*if comma
*set inventory &", "
*set inventory &"stun grenade"
*set comma true
inventory: ${inventory}
*fake_choice <<The options down here seem to lack any content. But I understand you might want to put some placeholders first. Thought I'll point it out>>
*selectable_if (smg_suppressed) #shoot
#damn i can do a thing
thanks always glad to get tips on how to clean my code up a bit
also the fake choice bit was just so i could confirm that it worked the way i wanted it to
Oh, I see. I’m glad that somebody tried to experiment with their code.
Yep, there’re several habits that you need to get used to keep your code tidy such as capitalization, ending commands (`*finish, *goto), etc.
What is this sorcery? Burn the witch! Burn the witch!
Okay, I have some pagan research to do.
Lul.
Once you enter, there’s no escape.
Anyway, maybe this and this (under truly bizarre reference) will help you in your research.