| 01-04-2004, 08:13 PM | #1 |
yea umm im making an ability called Zantetsu , i want it to have a percent chance to kill the targeted unit. i have this so far Events Unit - A unit Finishes casting an ability Conditions (Ability being cast) Equal to Zantetsu (Level of Zantetsu for (Casting unit)) Equal to 4 Actions If ((Random integer number between 1 and 10) Less than or equal to 5) then do (Unit - Kill (Target unit of ability being cast)) else do (Floating Text - Create floating text that reads Zantetsu Failed! at (Position of (Target unit of ability being cast)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency) the first problem is that it never kills a unit, at any level ( i have 4 separate triggers, one for each level) the second is that the text is always displayed at the center of the playable map area. anyone have any ideas on why this happens and how to fix the whole thing? |
| 01-04-2004, 08:23 PM | #2 |
the reason is the event response you use is invalid for your action. If the ability casting time is 0 then just change the action to begins casting. Else make a seperate trigger that does "When a unit begins casting Zantetsu set variable ZantetsuTarget[Player number of owner of casting unit] to target unit of ability being cast." and change the event response you used to ZantetsuTarget[Player number of owner of triggering player] |
| 01-04-2004, 08:29 PM | #3 |
wow that simple huh? thanks Scarlet-Russian |
| 01-04-2004, 09:14 PM | #4 |
Also you can use event "Unit begins the effect of an ability" instead of "starts casting" if the casting time doesn't happen to be zero. Hey does the new patch give you a "target unit of ability being cast" event response? Damn, that solves a load of problems... |
