Warcraft III resources & community, 2003–2006 · archived

Trigger Help

9 posts
#1

Trigger Help

I created Lotr Footies and i need help with an anti-backstabbing trigger. i am sick of people bs each other and leaving. plz help me.
#2
The best one I know of is
Event: (player owned unit event) a unit ownec by (player #) is attacked

Condition:
Player comparison- owner of attacking unit is equal to (player#) <----an ally player

Action:
Unit- remove/kill (attacking unit)

that way, anyone who tried to BS looses their unit that they try to BS with. But I'm sure you can see the problem with this trigger. It runs and checks every time a unit is attacked, and with so much attacking going on like there is in usual footy wars maps, it can cause some a bit of lag in late games.

Thats just triggering. How I would do it would not involve triggers. I would have each group of players (assuming its 3v3v3v3, correct?) have their own armor and attack type (i.e. normal, seige, medium, unarmored, ect) and change the properties of the armor and attack types so that players do normal damage to the armor types that their enemies use, but absolutely nothing to those of their allied players. For example, one set of 3 players has medium armor and magic attack. Magic does normal damage to all other armor types, but does 1% damage to medium armor (the armor type of that player and his allies). Its a bit complicated, but its by far the most effective.
-VGsatomi
#3
I usually use the hotkey "a" when I attack people and therefor I could easily by accident attack my own teammate, this shouldent destroy my whole game so therefor I suggest instead of doing this the way VG said you should do it the way so you are simple unable to attack allied units. I forgot the trigger for this though but I will try to look into it and post about it later :P

(On a site note, cool map, I like it :) )
#4
Raging, just use VG's trigger for that, but instead of killing the unit, order the attacking unit to stop, but it will still cause lag if alot units are fighting
#5
do you actually know if that will cause lag? or is that just some postulation based on the fact that having a lot of triggers running 'sounds' like a laggy idea

because i have a lot of attack triggers, damaged triggers, periodical triggers, etc etc... (not in a footman map, but nonetheless) running all the time and it causes little to no lag at all
#6
n most footy maps every player has at lest 60 units and there r 5 players fighting, so the trigger has to check really much. no i dunno if it lags, but I think
#7
That is why I suggest doing so you are simply unable to attack allies instead. I know it can be done but dont remember how and not gonna bother tjecking right now...
#8
Thanks alot i'll go try this out and pray it doesnt create lag.
#9
Ramzan most footy maps every player has at lest 60 units and there r 5 players fighting, so the trigger has to check really much. no i dunno if it lags, but I think


yes and i had periodical triggers running at 0.05 seconds with bodies the size of paris along with on attack triggers running constantly during fighting, i still stand by that massively running triggers doesn't cause lag, or any that it does cause is inconsequential (as long as you patch up memory leaks and any objects)