Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Killing ally units
Killing ally units
Apr 11 2009, 7:39 am
By: UED_TwiSted  

Apr 11 2009, 7:39 am UED_TwiSted Post #1



I am making a team scenario and am having trouble with people killing their teammates' units in order to gain points for themselves.
What I would like to know is if there is a trigger or other method that I can use that would either prevent them from getting points by killing a teammate, or that player suffers a penalty for killing a teammate.



None.

Apr 11 2009, 8:36 am Elvang Post #2



Continually run a trigger forcing each player to ally each other, if I remember correctly it will interrupt any attacks targeted towards allies.



None.

Apr 11 2009, 11:46 am NudeRaider Post #3

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

Not any. Very fast attackers like lings can still get an attack through, but it's really hard and usually not worth the effort anymore.


If you want to give them a penalty then when you detect kills score you could check if the enemy force has suffered deaths of [any unit]. If not, then they team killed and you can react accordingly.

This method is not perfect because you can still teamkill as long as there's a battle going on and your team killed an enemy unit until the next trigger loop. It also fails if both sides team kill the same time. Therefore hyper triggers are highly recommended as the chances of leaks in the triggering are becoming acceptibly small basically Meaning if you continuously teamkill you'll lose more than you win even though you might sometimes be lucky and get points added for once.

If they did suffer at least 1 death then just set this forces' deaths for [any unit] to 0.
This has the nasty side effect that you clear all death counters the same time. So if you're using death counters
as variables then you have to get more specific. For example you could check for [men] and [buildings] (this makes things a little more complicated as you need 2 triggers) or just for [men] (this wouldn't cover building kills, incase you give points for razings score too).




Apr 14 2009, 1:21 pm Oo.DaMeiN.oO Post #4



I created a perfect one for a 3v3 game with each controlling one unit at a time.
( I'll shorten it to two to show how its done )

P1/P2 are on one team
P3/P4 are on one team
( All of them using ghost )

Code
P1 has a kill score of 350
P3 has suffered exactly 0 deaths of Ghost
P4 has suffered exactly 0 deaths of Ghost
P2 has suffered exactly 1 deaths of Ghost

Set "P1TeamKill"


Code
Current players kill score is exactly 350

Reset current players Kill Score


The reseting of KS goes below those triggers, which I found run best if you have all of them in P1's section at the top.

This will only work of course if you make triggers for each unit they command after you find their KS you gain per kill.

Which is easy enough to do; Just enable a leaderboard that shows Kill Score 24/7, create two units that are the same you are using and kill one. Your KS will equal what you need the "350" to be in my triggers.



None.

Apr 14 2009, 1:27 pm rockz Post #5

ᴄʜᴇᴇsᴇ ɪᴛ!

what happens when you kill your partner when he kills an opponent?



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

Apr 14 2009, 2:17 pm NudeRaider Post #6

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

Yeah it is far from perfect.
It doesn't work with splash or when the players can have more than 1 unit. It'll also get screwed up if there are computer enemies around or when both sides teamkill the same time.
And actually this is what I said, just that you made it for a specific unit (score and deaths) and added an obsolete check of deaths for the teammate(s).
Quote from NudeRaider
when you detect kills score you could check if the enemy force has suffered deaths of [any unit]

But yeah, as an alternative to what I said you could reset kills score instead.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[2024-5-04. : 1:05 am]
Vrael -- that's better
[2024-5-04. : 12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[2024-5-03. : 10:18 pm]
Vrael -- who says I'm not a total madman?
[2024-5-03. : 2:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
Please log in to shout.


Members Online: Moose