|
Post by Julius CMXCIX on Aug 4, 2011 10:55:27 GMT
I have a design challenge I haven't yet resolved. I have numerous units that can be either killed or removed. I want to detect when they are killed and give the player a bonus, but not do so when they have been merely removed. Do any of you have a clever solution? Data editing can be involved.
|
|
Watson
Stormwind Member
Second Rate Exorcist
asdf
Posts: 1,200,000,005
|
Post by Watson on Aug 4, 2011 11:16:30 GMT
I'm not entirely sure I've understood this.
Are these units from a specific player? If so, using "Accumulate Attribute: 1: Killed PX" does the trick. You'll need the TS add-on though, and stability issues are unknown.
|
|
|
Post by Julius CMXCIX on Aug 5, 2011 1:31:33 GMT
I think I've worked out a good method. Use a set of triggers to constantly check for whether kill ratio has gone below a certain point, and when it has tribute that player a kill. I've heard that kill ratio can be a little unreliable but hopefully it'll work fine in this context.
|
|
|
Post by Basse on Aug 5, 2011 5:38:12 GMT
Couldn't the trigger that removes the unit just deactivate the one that gives you a bonus, right before it removes the unit..?
|
|
|
Post by Julius CMXCIX on Aug 5, 2011 14:52:05 GMT
That would work, but there's dozens and dozens of these units. I'd have to have separate reward and removal triggers for each, which is obviously something I'd rather avoid. I can achieve the same effect but with fewer than ten triggers in total.
Also your method would not work if some of the units weren't yet created. However I've gone with the Invisibility Cloak anyway.
|
|