| 12-16-2006, 01:17 AM | #1 |
There's a certain region in the map that I'm working on that has a slowing effect that reduces any unit's speed to 150 through triggers. Then, there's a certain item that I call the "Leg of Wonders"(it's cheesy name, but that's the point). It would "stop" the effect of the region's slowing effect. I'm doing this becuase I don't want a buff to appear. I tested it by having a hero walk in and out of the region. The first part of the trigger works: Having the hero walk through the region with the item and not having it's speed reduced to 150. Then, walking back in without the item and sucessfully having it reduce the hero's speed by 150. However, the second part is not doing so well. First of all, here are the checks that done when heros are inside the region: Trigger: The checks don't seem to work for heros that are already inside the region and take/lose the Leg of Wonders. If they're in the region and they drop the leg, then they still move at their default speed. If the unit drops the item, leaves the region, re-enters, and then grabs the item, they don't have their speed reset to normal. What did I miss? |
| 12-16-2006, 01:38 AM | #2 |
Why don't you just use Unit aquires/loses an item events with unit enters/leaves region? The way you have coded it leaks a lot, and is sort of ineffective eg, a unit picks up the item - add the unit to a unit group, remove the unit from the group when it drops the item - check if the unit is in the region and change movespeed accordingly a unit enters/leaves the region - check if the unit is in the unit-group and change movespeed accordingly |
| 12-16-2006, 01:47 AM | #3 |
I totally forgot that the Unit Aquires an Item existed. Damn. I'll see what happens. |
