| 02-05-2005, 06:46 PM | #1 |
I have this trigger that adds to a unit +5 movement speed after every unit he kills, then waits 60 seconds and removes the 5 points bonus from his movement speed. It works well until he kills a unit while under the effect of a speed changing spell, like purge or bloodlust. Anyway i can do this work and not being affected by buffs? |
| 02-05-2005, 06:47 PM | #2 |
i belive there is a trigger, i think it maybe in WEU, though, it increases speed. |
| 02-05-2005, 06:58 PM | #3 |
Guest | You can probably use the Boot of Speed ability, with 12 levels, and changing the level of that ability to whatever you want it to be. |
| 02-05-2005, 07:40 PM | #4 | |
Quote:
Yeah, but it increases either the current speed pr the defult speed, which doesn't solve my problem... |
| 02-06-2005, 11:58 PM | #5 |
You can change this trigger to however you want, but this will work: Events: A unit dies Conditions: (Killing Unit) Equal to thisUnit Actions: Unit - Set thisUnit Movement Speed to (Current Movement Speed of thisUnit) + 5 Wait 60.00 game-time seconds Unit - Set thisUnit Movement Speed to (Current Movement Speed of thisUnit) - 5 ------- thisUnit is a unit variable that contains the unit who's speed you want to change. Logically, it will add 5 points of speed when the unit kills something, and then takes off 5 points of speed after 60 seconds. |
| 02-07-2005, 10:26 AM | #6 |
a 60 second wait would cause instancing problems. You may wish to do it like this For integer 1-60 A if For loop integer A=60 then set thisunit speed=(current movement speed of thisunit) - 5 else wait 1 |
| 02-07-2005, 07:03 PM | #7 |
And that would be different from what I just did because...? |
| 02-07-2005, 07:18 PM | #8 |
read my entire post.... if a trigger is running a wait action 2ce at once, it gets confused. So my way gets rid of any multiinstancing problems, but other thatn that it does nothing |
| 02-07-2005, 09:44 PM | #9 |
Ok, so from what I understand, this is your trigger: Events: A unit dies Conditions: (Killing Unit) Equal to thisUnit Actions: Unit - Set thisUnit Movement Speed to (Current Movement Speed of thisUnit) + 5 For Loop Integer A From 1 To 60 If (Integer A) = 60 Then Unit - Set thisUnit Movement Speed to (Current Movement Speed of thisUnit) - 5 Else Wait 1.00 game-time seconds ---- That won't work. In GUI, the wait action will be in a separate function because of the way GUI creates If/Then/Else statements. Instead of actually waiting, the trigger will call the function with that wait action in it. So what will actually happen is the trigger will loop through calling the wait action 59 times and reduce the movement speed once, all of which happens instantly. Keep in mind that this trigger has to run everytime thisUnit kills another unit. Trust me, I've done this kind of thing in my S3MC maps and haven't run into a single problem. |
| 02-07-2005, 11:05 PM | #10 |
1 your wrong 2 your wrong ya probobly it does some wierd way. but you can do it this way, ive gotten it to work. and it was supposed to reduce only once O.o |
