| 07-23-2005, 07:12 PM | #1 |
I made a spell that slows enemy but im having a few problems. The spell dummy is life drain and i have 2 things that i cant fix. Code:
Bone Collector Slow
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to TEST (Neutral Hostile)
Actions
Unit - Set (Target unit of ability being cast) movement speed to (((Current movement speed of (Triggering unit)) / (Real((Level of Slow for (Triggering unit))))) / 1.25)Code:
Bone Collector Slow 2
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to TEST (Neutral Hostile)
Actions
Unit - Set (Target unit of ability being cast) movement speed to (Default movement speed of (Triggering unit))Code:
Bone Collector Slow 1
Events
Unit - A unit Stops casting an ability
Conditions
(Ability being cast) Equal to TEST (Neutral Hostile)
Actions
Unit - Set (Target unit of ability being cast) movement speed to (Default movement speed of (Triggering unit))Ok, when the ability is casted it lasts 8 seconds or depending on how long i set the duration of the dummy spell. But the slow1 and 2 are if the spell stops like if he moves it stops the spell and the enemy wont be slow anymore, and the finish spell is for after the spell is done after the 8 seconds the enemys speed goes back to default. Thats where the problem is. After he FINISHES the spell, it doesnt set the enemys speed back to default it keeps him slow. and the other thing is for Code:
Bone Collector Slow
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to TEST (Neutral Hostile)
Actions
Unit - Set (Target unit of ability being cast) movement speed to (((Current movement speed of (Triggering unit)) / (Real((Level of Slow for (Triggering unit))))) / 1.25)What i have atm is the enemys current speed is divided by the lvl of ability divided by 1.25. Thats not what i want but i was just seeing how things worked. What im trying to do is every lvl it slows the enemy down by a % Lvl 1- Slows enemy down by 25% Lvl 2- Slows enemy down by 35% Lvl 3- Slows enemy down by 45% Lvl 4- Slows enemy down by 55% Might change the % around eventually for balance issues, but i dont even know how to do %, i cant find anything other than a random percent thing. Any help would be great. |
| 07-27-2005, 04:27 PM | #2 |
Erm. The difference between it and normal slow spell is that it is active only as long as its maintained? |
| 07-27-2005, 07:50 PM | #3 |
the problem with the unit not speeding up is that you set the triggering unit's movement speed to default, the triggering unit being the one who stopped casting, you'll need to create a unit variable to hold the slowed unit. To do the % slow, set movement speed to Code:
(movement speed of unit) / (1.15 + (0.1 * (level of ability))) |
