Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Starting to learn death counters, trying to use gas for mana sys
Starting to learn death counters, trying to use gas for mana sys
Jul 7 2020, 7:07 am
By: Draelren  

Jul 7 2020, 7:07 am Draelren Post #1



So starting off I give 1 death counter if they have 1 'mana'

Quote
Trigger("Player 1"){
Conditions:
Bring("Current Player", "Selection", "71", At least, 1);

Actions:
Set Deaths("Current Player", "Goliath Turret", Add, 1);
Remove Unit At Location("Current Player", "Selection", All, "71");
Preserve Trigger();
}

I have a loop set up I believe...

Quote
Trigger("Player 1"){
Conditions:
Always();

Actions:
Set Deaths("Current Player", "Flag", Set To, 120);
}

Quote
Trigger("Player 1"){
Conditions:
Always();

Actions:
Set Deaths("Current Player", "Flag", Subtract, 1);
Preserve Trigger();
}

Quote
Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Flag", At most, 1);

Actions:
Set Deaths("Current Player", "Flag", Set To, 120);
Preserve Trigger();
}

And then the actual execution...

Quote
Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Goliath Turret", Exactly, 1);
Deaths("Current Player", "Flag", At most, 1);
Accumulate("Current Player", Exactly, 0, gas);

Actions:
Set Resources("Current Player", Add, 1, gas);
Preserve Trigger();
}

This seemingly does nothing though... curious as to what I might be doing wrong? This is my second death counter I've attempted, first one worked however.




Jul 7 2020, 9:24 am DaMnUFo0 Post #2



Does your trigger work for the first gas and then does it not work afterward?
If my assumption is correct, it could be because of the Accumulate condition or the Goliath Turret counter is always being updated past 1 after your first bring condition.

I also strongly recommend using hyper triggers when using death counters as it is good practice.




Jul 7 2020, 9:26 am Draelren Post #3



Quote from DaMnUFo0
Does your trigger work for the first gas and then does it not work afterward?
If my assumption is correct, it could be because of the Accumulate condition or the Goliath Turret counter is always being updated past 1 after your first bring condition.

I also strongly recommend using hyper triggers when using death counters as it is good practice.

Already got complex hyper triggers in effect.

It does not work for the first gas. Once the first one works and I know it's functioning, then I'll worry about expanding its use.




Jul 7 2020, 11:00 am GGmano Post #4

Mr.Pete-Tong

Complex hypertrigger? You need normal hypertriggers is 4 triggers containin 63 waits and 1 preserve trigger. But dc should work without hypertriggers just takes longer time. Step 1 on you trigger system says add 1 to goliath turret if a unit is at location 71. So check if You move or create a unit to that location Else your system never starts. Step 4 and 5 needs to be in right order if the wrong trigger fires first than the second trigger never fires. Your saying in step 4 that if p1 suffered at most 1 of flag set dc to 120 flags in step 5 You say same if p1 suffered at most 1 flag add 1 to gas. But in step 4 You set p1 flags to 120 so step 5 never work. Try moving step 4 down under step 5 that might work try.



A Legendary Map Maker, Player. Apparently im more than intresting to observe Irl

Ill try do my best in making all youre watchers happy

The maps I made are tweaked into perfection and maximum strategy added

Jul 7 2020, 11:16 am GGmano Post #5

Mr.Pete-Tong

Another good advice ive been using when making advanced dc systems is to display text for the player your using to test. So put display text on every dc system trigger one at a time and test the map with all dc system text displayet, to be sure they All fire correctly at the right times. Counting dc will fire over and sending text over and over. Setting dc triggers fires only once. That will make it more easy for You to find which step in your system not working

Post has been edited 1 time(s), last time on Jul 7 2020, 11:23 am by GGmano.



A Legendary Map Maker, Player. Apparently im more than intresting to observe Irl

Ill try do my best in making all youre watchers happy

The maps I made are tweaked into perfection and maximum strategy added

Jul 7 2020, 12:58 pm Dem0n Post #6

ᕕ( ᐛ )ᕗ

Quote from GGmano
Complex hypertrigger? You need normal hypertriggers is 4 triggers containin 63 waits and 1 preserve trigger.
You can use the single "complex" hyper trigger to achieve the same effect. If the order of those triggers listed is the actual order in your map, then what GGmano said is right. You're resetting the DC to 120 before the trigger that adds gas gets checked, so no gas will ever be added. Remember in that SC triggers are read in top to bottom order starting with player 1 and ending with player 8, so the order of triggers will make or break any system.




Jul 7 2020, 3:38 pm NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Draelren

This seemingly does nothing though... curious as to what I might be doing wrong? This is my second death counter I've attempted, first one worked however.

Order matters. If your triggers are sorted like you posted they can't work.
Triggers are always checked one after another. There is no parallelism. First all of P1's triggers are checked in order, then all of P2's etc.

So what you posted does this: (simplified)
1st trigger is probably not the problem (did you check though?)
2nd trigger is not doing anything for loops beyond 1

so lets look at triggers 3-5:
3rd: always subtracts 1
4th: if lower than 2 sets to 120
5th: if lower than 2 adds gas

By the time the 5th trigger checks the DC it is already back at 120 by the 4th trigger -> it never fires.

In the classic trigger list you can move triggers around.




Jul 7 2020, 8:14 pm Draelren Post #8



Failed to get ImageSize ( URL )https://imgur.com/a/M5T68CcFailed to get ImageSize ( URL )

https://imgur.com/a/M5T68Cc

EDIT: Does img not work here?

Here is the trigger list order that I have. I did not write them out in correct order, sorry.




Jul 7 2020, 8:29 pm Dem0n Post #9

ᕕ( ᐛ )ᕗ

In the second trigger you add 1 death of Goliath Turret if the player brings a unit to location 71, but then in the fourth trigger you check if the player has exactly 1 death of Goliath Turret. Is it possible that more than 1 death is being added for Goliath Turret? I would change it to set to 1 death, not add, and see if that works. Also, I would replace the "at most" 1 deaths of Flag with "exactly"; I think "at most" can be a little funky, and since you're subtracting the deaths by 1 each time, there's no chance the trigger won't run when the death is exactly 1.




Jul 7 2020, 8:33 pm Draelren Post #10



Quote from Dem0n
In the second trigger you add 1 death of Goliath Turret if the player brings a unit to location 71, but then in the fourth trigger you check if the player has exactly 1 death of Goliath Turret. Is it possible that more than 1 death is being added for Goliath Turret? I would change it to set to 1 death, not add, and see if that works. Also, I would replace the "at most" 1 deaths of Flag with "exactly"; I think "at most" can be a little funky, and since you're subtracting the deaths by 1 each time, there's no chance the trigger won't run when the death is exactly 1.

It was changing it to "exactly" that did it.

Thank you so much!




Jul 7 2020, 8:39 pm Draelren Post #11



Next question would be this then...

Is there a way to make it to where I don't need to code this for however much mana I have set to max?

Quote
Trigger("Heroes"){
Conditions:
Deaths("Current Player", "Goliath Turret", Exactly, 1);
Deaths("Current Player", "Flag", Exactly, 1);
Accumulate("Current Player", Exactly, 0, gas);

Actions:
Set Resources("Current Player", Add, 1, gas);
Preserve Trigger();
}

Where then I'd proceed to make it...

Quote
Trigger("Heroes"){
Conditions:
Deaths("Current Player", "Goliath Turret", Exactly, 2);
Deaths("Current Player", "Flag", Exactly, 1);
Accumulate("Current Player", Exactly, 1, gas);

Actions:
Set Resources("Current Player", Add, 1, gas);
Preserve Trigger();
}





Jul 7 2020, 10:08 pm NudeRaider Post #12

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

remove the accumulate condition and always check for 1 deaths of goliath turret.




Jul 7 2020, 11:19 pm Draelren Post #13



So I have it working exactly how I want it... for anyone who might want to do this system in the future, and comes across this thread:

Quote
Trigger("Heroes"){
Conditions:
Always();

Actions:
Set Deaths("Current Player", "Flag", Set To, 120);
}

Quote
Trigger("Heroes"){
Conditions:
Bring("Current Player", "Selection", "71", At least, 1);
Deaths("Current Player", "Goliath Turret", At most, 10);

Actions:
Set Deaths("Current Player", "Goliath Turret", Add, 1);
Remove Unit At Location("Current Player", "Selection", 1, "71");
Preserve Trigger();
}

Quote
Trigger("Heroes"){
Conditions:
Always();

Actions:
Set Deaths("Current Player", "Flag", Subtract, 1);
Preserve Trigger();
}

Then we start the countdown, from the highest possible option.

Quote
Trigger("Heroes"){
Conditions:
Deaths("Current Player", "Goliath Turret", At least, 10);
Deaths("Current Player", "Flag", Exactly, 1);
Accumulate("Current Player", Exactly, 9, gas);

Actions:
Set Resources("Current Player", Add, 1, gas);
Preserve Trigger();
}

Quote
Trigger("Heroes"){
Conditions:
Deaths("Current Player", "Goliath Turret", At least, 9);
Deaths("Current Player", "Flag", Exactly, 1);
Accumulate("Current Player", Exactly, 8, gas);

Actions:
Set Resources("Current Player", Add, 1, gas);
Preserve Trigger();
}

And so on, on down to 0 gas.

Quote
Trigger("Heroes"){
Conditions:
Deaths("Current Player", "Goliath Turret", At least, 1);
Deaths("Current Player", "Flag", Exactly, 1);
Accumulate("Current Player", Exactly, 0, gas);

Actions:
Set Resources("Current Player", Add, 1, gas);
Preserve Trigger();
}

Then we wrap it up.

Quote
Trigger("Heroes"){
Conditions:
Deaths("Current Player", "Flag", Exactly, 1);

Actions:
Set Deaths("Current Player", "Flag", Set To, 120);
Preserve Trigger();
}

We could shorten this also by counting up, instead of down I believe, but I'm still learning. Hope this is helpful for other newbs.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
Please log in to shout.


Members Online: MetalGear