Staredit Network > Forums > SC2 Assistance > Topic: When Unit dies...
When Unit dies...
Jun 12 2010, 10:08 am
By: Xesh  

Jun 12 2010, 10:08 am Xesh Post #1



Hey again.

This time its mock up death-counters; here is the situation:
There are going to be a lot of units fighting around my map and I want to make sure the spawn-rate doesn't overflow causing an imbalance..To remedy this(which was perfect back in SC1..) I will spawn a unit for every 1 Death counter of that unit. This will keep recycling the deaths in a balanced way.

Now. Ive got the event, " When Unit Dies" But I can't figure out how to say "When This specific unit dies for this player" regardless of player group or region or whatever.

If i could just find that I think that would solve everything.



I swear SC 1 Triggers are less of a headache. I begging for them at this point. Its like a bad drug isnt it?




None.

Jun 12 2010, 10:27 am Devourer Post #2

Hello

Event: Any unit dies
Condition: Unit type of (triggering unit) == UNIT
Condition: Owner of unit (triggering unit) == player 1
Action: create 1 unit of type (triggering unit type) for player 1.

Instead of player 1 you could as well use triggering player and delete the second condition.



Please report errors in the Staredit.Network forum.

Jun 12 2010, 10:29 am Xesh Post #3



Fast reply...thanks man. Let me test this.

Edit 1: Alright, got the trigger setup..
Edit 2: And it works, as expected, great! thanks.

Now, How do I say: "When 2 or more of these units die" ?

also: is there a death counter even in this version?

After searching a bit..I can probably set up a counter for every death and subtract the revive from the counter but.. theres probably an easier way.

Post has been edited 1 time(s), last time on Jun 12 2010, 10:40 am by Xesh.



None.

Jun 12 2010, 11:36 am Devourer Post #4

Hello

I would make an integer variable or array if that is possible.
Then, if variable hellion == 2 -> create 1 hellion, set variables to zero.
If not: add +1 to variable hellion



Please report errors in the Staredit.Network forum.

Jun 12 2010, 5:32 pm Ashamed Post #5

Hear me Raor!!

Yeah integer = the new death counters!! So you gotta learn them.
They are kinda confusing... but they pretty much work the same as DC's. So if you got DC's you can learn them easy.
array = godly because you can make one for thousands of triggers.



None.

Jun 12 2010, 5:43 pm Devourer Post #6

Hello

WAIIT
integers = confusing? seriously :D
I lol'd! Integers are the simpliest type of variables. It's just a number, nothing more or less^^



Please report errors in the Staredit.Network forum.

Jun 12 2010, 5:52 pm Ashamed Post #7

Hear me Raor!!

That is why I said If you know DC then its easy... Devourer you can't tell me explaining DC's to someone that does not get them was easy!
The only reason you knew about them is because its obv to us!!
I only made like 4-5 test triggers and already had them down.



None.

Jun 12 2010, 6:51 pm Xesh Post #8



Aaaaah I see! I dont even have to make tests here, i think I have it down with common sense..This is so easy, Damnit! Youre right! hahaha..
So ive decided to instead..
When Any unit dies, Add to integer
When integer is More than a certain ammount, subtract this much and create units


Also Devourer, I bestow upon you my blessing and title of "Wise" for your continued efforts in helping others with powerful information.

Also, Ashamed: You show a powerful knowledge and grasp of the editors, i hope to see you more as the nights bear on. (rawr rawr)



None.

Jun 26 2010, 1:52 pm (U)Bolt_Head Post #9



Quote from Xesh
There are going to be a lot of units fighting around my map and I want to make sure the spawn-rate doesn't overflow causing an imbalance..To remedy this(which was perfect back in SC1..) I will spawn a unit for every 1 Death counter of that unit. This will keep recycling the deaths in a balanced way.

I'm still new to SC2 triggers myself but I'm pretty sure it doesn't work that way and that kind of situation doesn't happen.

In SC1 Conditions are checked at specific times and if a condition is true while it checks then an action is performed. So if you had multiple units die between checks you would have to worry about losing track.

I've noticed that pretty much all of the EVENT for SC2 are checking for CHANGES and not a type of EXISTENCE.
In starcraft 1 there is a condition "Player has suffered X deaths of unit", new players would frequently get confused thinking that their trigger would happen each time a unit dies when in fact it checked for a existing deathcount. In Starcraft 2 the Event is actually related to the death itself. Imagine you made a log book and every time a unit dies you make an entry describing that. Then for each death in the log book the Conditions of your trigger is checked, (and if conditions are all true, then the actions are run) Therefore it is imposable to lose count because the triggers do not happen often enough.

Starcraft1's Trigger checking in SC2 language is...
Event: Period every 2 game seconds.
Condition: SC1
Action: SC1


Edit: Opps this was kinda old.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[01: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
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
Please log in to shout.


Members Online: Ultraviolet, Roy