Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: I need more than 256 Switches....
I need more than 256 Switches....
Dec 1 2009, 6:29 am
By: Mesden  

Dec 1 2009, 6:29 am Mesden Post #1



I'm creating a Map where each Round in each Level requires a Switch. There are 8 Rounds per Level and a total of 8 Levels. Since there are 8 Players, I need to figure out what to do with the Triggers. If I just keep using switches I'm gonna run out... Any ideas?

This is how it works, the Player has a Civilian, he takes the Civilian to a Beacon, and the first Round begins. He takes his Civilian to the beacon a second time when he's ready to begin the next Round, then the next round begins, and each Round gets a little harder until he/she completes the Level. Each time he takes the Civilian to the Beacon, I need to use a Switch, as I'm using the same Unit to start the Round, but as each Round progresses, there are more Units that Spawn.

Any assistance would be appreciated. Using Trigger Examples would also help me greatly.



None.

Dec 1 2009, 6:32 am Kaias Post #2



http://www.staredit.net/wiki/Death_Counters

Use a death counter to represent the current level and round.



None.

Dec 1 2009, 6:38 am Mesden Post #3



I haven't been making Maps as long as that Poster has so I'm finding it a bit difficult to understand what he's getting at...



None.

Dec 1 2009, 6:45 am Jack Post #4

>be faceless void >mfw I have no face

Nvm

Post has been edited 1 time(s), last time on Dec 1 2009, 6:55 am by zany_001.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 1 2009, 6:49 am Kaias Post #5



Quote from Mesden
I haven't been making Maps as long as that Poster has so I'm finding it a bit difficult to understand what he's getting at...

Okay, a 'switch' can hold two values, on or off, 0 or 1. A 'death counter' is just a handy tool we use as a variable that can hold a value much much greater. It would help to think of a death counter as a variable that you would use in math.
For example:

Conditions:
x is equal to 1
Actions:
Whatever actions are needed for the start of level 1 round 1

Conditions:
x is equal to 2
Actions:
Whatever actions are needed for the start of level 1 round 2

And so forth. We don't actually have variables like that so instead we use the number of Deaths for a Player as our variable.

In this situation/example I'll use Player 8's (some computer) deaths of 'Level Indicator' (some unused unit renamed to be Level Indicator) to be our variable that will be representing which level/round the players are on. Substituting this in it is:

Conditions:
Player 8 has suffered exactly 1 deaths of 'Level Indicator'
Actions:
Whatever actions are needed for the start of level 1 round 1

Conditions:
Player 8 has suffered exactly 2 deaths of 'Level Indicator'
Actions:
Whatever actions are needed for the start of level 1 round 2

Whenever the civilian goes to the beacon, you can just set the deaths of 'Level Indicator' for Player 8 to whichever value represents what you want it to. Understand now?



None.

Dec 1 2009, 6:54 am Mesden Post #6



No I'm still not quite getting it sorry :(



None.

Dec 1 2009, 7:16 am Jack Post #7

>be faceless void >mfw I have no face

Just make those two triggers. Basically, the deaths of Cantina represent the current level. If the deaths are 1, then it's level one. If the deaths are two, then it's level two. You can add and subtract the deaths.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 1 2009, 7:45 am Vrael Post #8



Death counters, before their use in mapping, counted how many deaths of each unit in a given game of starcraft. If Player 1 and Player 2 each made 10 marines and then went and attacked each other and they all died, then the value of P1's "Terran Marine" deathcount and the value of P2's "Terrain Marine" death count would each be equal to 10. Fortunately, we can set the value of a unit's death count through triggers, and detect the values. There are a number of units which have death counts assigned, but do not appear in the game, like the Cantina unit, so its natural to pick that particular death counter and others like it to avoid Starcraft adding values when units die and messing up our triggers. Basically, we can store numeric values in each death count.

Modify deaths of "Zerg Zergling" Set to 10 for Player 2
Modify deaths of "Zerg Zergling" Add to 3 for Player 2
Modify deaths of "Zerg Zergling" Subtract 7 for Player 2

After these 3 actions are finished, the following trigger will be able to run
Code
Players:
Player 2
Conditions:
Player 2 has suffered exactly 6 deaths of Zerg Zergling
Actions:
Display text(" 0 + 10 + 3 - 7 = 6")


Also, try reading the section on Death Counters in the FAQ, here:
http://www.staredit.net/topic/7783/



None.

Dec 2 2009, 10:20 pm Falkoner Post #9



Try this tutorial: http://Falkoner.CoW.Googlepages.com/Death_Counts.html (Also I apologize, apparently Google Pages has finally shut down my website, so you need to download the file first)

They're the same thing as switches, but instead of using Set and Clear, you simply set it to 0 or 1.



None.

Dec 2 2009, 10:34 pm Mesden Post #10



Thanks Guys, I figured it out, I just used Gas as Level Counters. Death Counters were a bit too difficult for me to understand.



None.

Dec 2 2009, 10:38 pm Falkoner Post #11



But Death Counts are the same thing as gas! :P You just use the Death condition and the Set Deaths action, it's the same as the Set Resources and the Resources action and condition! :bleh: Using Death Counts allows you to have over 1600 switches, more if you use them to make a binary array :P



None.

Dec 2 2009, 10:45 pm Mesden Post #12



Yeah but there are Conditions on Death too that would need more Triggers, Gas just makes it Easier.



None.

Dec 2 2009, 10:48 pm Jack Post #13

>be faceless void >mfw I have no face

Don't need more conditions for Deaths.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 2 2009, 11:08 pm NudeRaider Post #14

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

Seriously use deaths. It has no drawbacks at all (it's just like using the gas counter) and is easy to use and understand. And unlike switches each player has his own count.
Then you need just 1 trigger to increase the level/round count:

[Player owning the civilian]
Conditions:

Current Player brings at least 1 civilian to 'next round'
Actions:
Modify deaths: Add 1 death to cantina of Current Player (you find it under neutral - neutral - cantina) *1)
Move All civilian owned by Current Player at 'next round' to 'reset civ'
Preserve trigger

*1) I recommend this unit because it cannot die. But you can choose any other unit that does not die in your map. You may rename this unit to 'Level/Round', if you wish, to make your triggers easier to understand, but that's not necessary for it to work.

Then you only need to check for this death in your spawn triggers (or wherever you need it)

[Put in Trigger owner here]
Conditions:

Current Player has suffered exactly 1 death of cantina
Actions:
Create x "zerglings (Level1, Round 1)" at 'spawn' for Player x

Does that really look that scary?




Dec 2 2009, 11:08 pm rockz Post #15

ᴄʜᴇᴇsᴇ ɪᴛ!

player has compare number deaths of unit
player has compare number accumulate type

They are the same, each has 4 inputs. If you use deaths exactly like gas, there will be no change. Just make sure you use a unit which won't die, like a powerup.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Dec 3 2009, 2:23 am fritfrat Post #16



You may as well use gas if it is not used elsewhere in the game, since that is a readily visible way to tell people what level they are on. They are basically are exactly the same thing, except for that one thing: you can always see gas, whereas you need triggers to point out what the DC is.
DC's are useful since there are hundreds and hundreds of player combinations with units, but only 2 resources, and many games already use resources. There is always Custom score with a leaderboard, too! :)



None.

Dec 3 2009, 2:26 am rockz Post #17

ᴄʜᴇᴇsᴇ ɪᴛ!

death counts are easily viewable through the leaderboard.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Dec 3 2009, 2:49 am Vrael Post #18



Quote from rockz
death counts are easily viewable through the leaderboard.
Are you sure? I'm pretty sure you'd need to set up a bunch of triggers to convert from DC's to custom points, or razings, ect.



None.

Dec 3 2009, 3:16 am rockz Post #19

ᴄʜᴇᴇsᴇ ɪᴛ!

display kills of unit+228 (ie deaths of terran marine is unitID:228, ghost is unitID:229, etc...).



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Dec 3 2009, 3:32 am Vrael Post #20



Quote from rockz
display kills of unit+228 (ie deaths of terran marine is unitID:228, ghost is unitID:229, etc...).
Aren't kills going to be different from death counts though? If no triggers were involved I could see how this would work, but if DC's are modified with triggers in any way I don't think it will accurately reflect the count.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:08 pm]
Oh_Man -- example of wat u mean?
[05:59 am]
NudeRaider -- *is
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[2024-5-14. : 10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
Please log in to shout.


Members Online: 6audreyc5485er9, Ultraviolet, 1sophiee1923ya4