shinami
Redirect your complaints to the nearest wall
- Reaction score
- 47
So here are the 3 triggers with a spell that are making me confused.
So what this spell does is creates illusions every second for the cost of 300 mp. So first problem. My hero has 750 mp, and somehow he is only able to produce just one illusion, before his mp goes down to 150. How can i fix this?
Second problem.
Even if the hero has 1 mp, it will still produce an illusion, so all you have to do to abuse this is keep clicking the spell and you've got a billion of clones. My guess is i have to put on a condition somewhere that checkes if the unit has more or equal to 300, and if he doesn't cancel the effect, but i'm not sure so i want some advice.
I think thats it for the problems, i might encounter some more. +rep for help.
P.S Thanks to AceHart for the custom script that casts item illusions.
Code:
Illusion cast
Events
Unit - A unit Begins channeling an ability
Conditions
(Ability being cast) Equal to (==) Illusions
Actions
Set TriggeringUnit = (Triggering unit)
Set UnitPointVariable[0] = (Position of (Triggering unit))
Set OwnedUnit = (Owner of (Triggering unit))
Trigger - Turn on Periodic Illusion <gen>
Wait 10.00 seconds
Trigger - Turn off Periodic Illusion <gen>
Code:
Periodic Illusion
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit - Create 1 Dummy for OwnedUnit at UnitPointVariable[0] facing UnitPointVariable[0]
Unit - Add Item Illusions to (Last created unit)
Unit - Set mana of TriggeringUnit to ((Mana of TriggeringUnit) - 300.00)
Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, udg_TriggeringUnit)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Mana of TriggeringUnit) Less than (<) 300.00
Then - Actions
Trigger - Turn off (This trigger)
Unit - Order TriggeringUnit to Stop
Else - Actions
Custom script: call RemoveLocation(udg_UnitPointVariable[0])
Code:
Stop Illusion
Events
Unit - A unit Stops casting an ability
Conditions
(Ability being cast) Equal to (==) Illusions
Actions
Trigger - Turn off Periodic Illusion <gen>
So what this spell does is creates illusions every second for the cost of 300 mp. So first problem. My hero has 750 mp, and somehow he is only able to produce just one illusion, before his mp goes down to 150. How can i fix this?
Second problem.
Even if the hero has 1 mp, it will still produce an illusion, so all you have to do to abuse this is keep clicking the spell and you've got a billion of clones. My guess is i have to put on a condition somewhere that checkes if the unit has more or equal to 300, and if he doesn't cancel the effect, but i'm not sure so i want some advice.
I think thats it for the problems, i might encounter some more. +rep for help.
P.S Thanks to AceHart for the custom script that casts item illusions.