Variables, how the F do I actually use them? (PS4)
I'm either stupid, or I'm missing something. I know how to set up variables and have them in- or decrease, but I can't figure out how to actually use them akin to "if" conditions.
Here is an example:
I want to spawn random Argent Caches that increase the players max health by 10% (or something). However, the 'set modifier' can not just add 10%. Since I haven't found a command that can do that, I need a workaround with a variable that keeps track of how many times the player has upgraded their max health and then set the modifier accordingly, like:
1x set health to 110% - 2x set health to 120% - and so on.
So, how do I do that?
Posted Mar 1, 2021, 12:37 PM UTC
36
I don't have Doom installed currently, but I did exactly that already in the only map I published. IIRC there's a way (L1/R1 maybe?) to chose between number or variable when in the set modifier properties (and that's how you'd use variables in snapmap in general).
If that's not it, you can look in my map (ID: EJ5BUCXQ) but the logics are quite a mess (I reached 100% I think) so good luck with that... :/
Oh my god, paint me stupid!!! You're right, L2 for options lets me pick numbers, integers and such.
Thank's a lot.
Mh, really? I just picked my number variable in the 'set modifier' command and rigged a 'add' 10 to the number value everytime max health is increased at an Argent Cache. I put it all on a custom event too, so anytime I want to place a new Argent Cache as a health upgrade, I just can hook it to the event.
Doesn't seem messy at all to me.
My pleasure.
I was talking about the logics (I should have used the word "network") in my map: integers, numbers, triggers, filters and stuff all over the place. Makes it very hard to read...
I guess the stuff I'm currently rigging up isn't too complicated to get messy :D plus: I always try to keep it as simple as possible.
Another question that isn't worth a new post: Is the superhero landing possible in snapmap? I kinda want the player to fall into the next level in a dramatic way.
I guess so, I never felt it was different in the custom maps I played.