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.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: UndeadStar, Ultraviolet