How do I preserve death counters in a really effective way?
I need a huge amount of death counters that don't conflict. They're for a spell-based game like WAF, Naruto, etc. where I can't use wait triggers.
I also need to use them for timers.
Post has been edited 2 time(s), last time on Dec 3 2012, 7:43 pm by FlameViper.
None.
Depends on your situation. Describe in detail what you want to do.
None.
Add 1 death.
Preserve trigger.
We need to know what you're actually trying to accomplish, though.
Currently Working On: My Overwatch addiction.
You could look here, this may answer your question:
Death CountersFor anything more detailed, you'd have to be more specific.
Edit:
I need a huge amount of death counters that don't conflict.
Can you afford to simply use a different unit for each one, maybe even different players? I recently had a map that needed to use 40 nonconflicting death counters as timers across 8 players, I just used 40 different units for it.
Post has been edited 1 time(s), last time on Dec 3 2012, 7:49 pm by Azrael.
How do I preserve death counters in a really effective way?
I need a huge amount of death counters that don't conflict. They're for a spell-based game like WAF, Naruto, etc. where I can't use wait triggers.
I also need to use them for timers.
In that case, you basically have every unused unit at your disposal to use as a death counter.
Currently Working On: My Overwatch addiction.
Your question needs clarification - what exactly are you trying to do or optimize with/about your counters?How do I preserve death counters in a really effective way?
If you just want death counters that behave well, you should use units that cannot be in the game (like Cantina's) or units that will never die in the game (like mineral fields).
Quote from name:Thread Title
How do I make unlimited death counters?
There are limits to how much easily manipulable data you can store in a given broodwar map, making
unlimited counters is in-feasible.
- A death counter will store a value between 0 and (2^32)-1.
- Each unit is worth eight* death counters, one for each player.
*Technically you can have death counters for p9-12, but you have to actually kill units for them, making them much less useful.You can add more storage capacity to a death counter by logically combining it with other death counters or value holder. Say you wanted to double the max number stored in a death counter; A switch holds either 1 (set) or 0 (cleared), you could say that for all numbers greater than or equal to 2^32, switch 1 will be set, and for all numbers less than 2^32, switch 1 will be cleared (or that the value of switch 1 is equal to its given value * 2^32).
To check for the value (2^32+4) you would then have conditions:
Switch 1 is Set
DeathCounter is exactly 4
Edit:
I need a huge amount of death counters that don't conflict.
Oh, here's a huge list
Goliath Turret
Tank Turret type 1
Nuclear Missile
Alan Turret
Duke Turret type 1
Duke Turret type 2
Tank Turret type 2
Scanner Sweep
Protoss Scarab
Unused type 1
Unused type 2
Map Revealer
Disruption Field
Unused Terran Bldg type 1
Unused terran Bldg type 2
Uraj Crystal
Khalis Crystal
Unused Zerg Bldg
Protoss Unused type 1
Protoss Unused type 2
Khaydarin Crystal Formation
Mineral Field (Type 1)
Mineral Field (Type 2)
Mineral Field (Type 3)
Cantina
Mining Platform
Independent Command Center
Independent Starport
Jump Gate
Ruins
Vespene Geyser
Terran Marker
Protoss Marker
Zerg Beacon
Terran Beacon
Protoss Beacon
Zerg Flag Beacon
Terran Flag Beacon
Protoss Flag Beacon
Dark Swarm
Floor Hatch (UNUSED)
Left Upper Level Door
Right Upper Level Door
Left Pit Door
Right Pit Door
Start Location
Flag
Young Chrysalis
Psi Emitter
Data Disc
Khaydarin Crystal
ID:228
Post has been edited 1 time(s), last time on Dec 3 2012, 7:55 pm by jjf28.
TheNitesWhoSay - Clan Aura -
githubReached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.
How do I preserve death counters in a really effective way?
Write down which counters you use, and what you use them for, and what range of values they can take. For example, take the unused unit Cantina:
Cantina:
P1 0 = off; 1-43 Firebolt spell
P2 0 = off; 1-43 Firebolt spell
..
P6 0 = off; 1-43 Firebolt spell
P7 0-155 Timer
P8 0-215 Timer
If you have all this information stored and you know it, then you know you can code a 2nd spell or something in values 44+, as long as that spell can't be run at the same time as Firebolt, and you know its completely gone for P7/P8 since you're using it for a timer. However, you do have to be careful. If you code a 2nd spell in values 44+ and some of the firebolt conditions are "at least X deaths of firebolt for P1-6" then some of the firebolt conditions will be true when this hypothetical 2nd spell is going off, but if you just account for it with an "at most 43 deaths" condition, you can safely reuse these death counters if you know Firebolt and Spell 2 can't be used concurrently.
None.
I recommend for simplicity's sake:
If:
Player has suffered exactly 0 deaths.
Then:
Run actions
Set deaths to 250
And always subtract 1 from deaths.
This way, all your conditions will be the same, your actions will determine the cooldown. It's also very similar to wait in that regard, as waits are in the action as well. Finally, "subtract 1" will never go lower than 0, so your death counts are auto limiting, and by default the map starts out with 0 for all death counts, meaning all triggers would be ready to fire without waiting at the beginning of the game. If you want to reset the cooldown, just set to 0 (easier than adding 9999).
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
I recommend for simplicity's sake:
If:
Player has suffered exactly 0 deaths.
Then:
Run actions
Set deaths to 250
And always subtract 1 from deaths.
This way, all your conditions will be the same, your actions will determine the cooldown. It's also very similar to wait in that regard, as waits are in the action as well. Finally, "subtract 1" will never go lower than 0, so your death counts are auto limiting, and by default the map starts out with 0 for all death counts, meaning all triggers would be ready to fire without waiting at the beginning of the game. If you want to reset the cooldown, just set to 0 (easier than adding 9999).
Oh my god, that's so useful, I can't believe I never thought of that...
None.
Or you could scratch all that shit and just learn to use
OreoTriggers which does a great job preserving as many DCs for you as it can. Without you having to keep track of anything.
None.