| 11-08-2003, 09:59 PM | #1 |
i have a trigger that tells how much damage to do to the targeted unit of a spell. A unit begins casting an ability ability being cast equal to X If all conditions are true then do then actions else do else actions owner of casting unit current gold equal to 0 do nothing set life of targeted unit to life of targeted unit-random real number between 50-250. |
| 11-08-2003, 10:30 PM | #2 |
Is the trigger doing nothing at all? Or is it giving you an undesired effect? Could you please copy the trigger from the world editor.. it would help me understand it. Right click on the trigger name (in the "Trigger Functions:" box) and select "Copy as Text". |
| 11-08-2003, 10:53 PM | #3 |
its not doing anything Cointoss Copy Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Coin Toss Actions Set cointoss2 = (Random integer number between 50 and 250) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Owner of (Casting unit)) Current gold) Equal to 0 Then - Actions Do nothing Else - Actions Unit - Set life of (Targeted unit) to ((Life of (Targeted unit)) - (Random real number between 50.00 and 250.00)) |
| 11-08-2003, 11:22 PM | #4 |
"targeted unit" only works with "Unit is issued and order targeting a unit" It does not work with "Unit - A unit Begins casting an ability" or any of the related events. To do what your asking you need 1 of 2 things. 1. WEU (it has a fuction that will get the last target of the ability) -OR- 2. 2 triggers, 1 for when the order is issued that stores the target in a variable and the other runs when the unit starts casting the ability and it calls appon the variable set in the first trigger as the target. |
| 11-08-2003, 11:25 PM | #5 |
The target unit of issued order only works for the event, a unit issues an order targeting object/point/no target. you need first to define Target unit into a variable... the answer is here ---> http://www.wc3campaigns.com/forums/s...threadid=33040 |
| 11-08-2003, 11:41 PM | #6 |
Your Then / Else actions are also backwards. Right now your trigger reads "when a unit casts an ability - that is equal to coin toss - then do nothing" EDIT: My mistake. I thought the If All Conditions = True only referred to the conditions below that particular line. |
| 11-08-2003, 11:46 PM | #7 | |
FerretDruid: Quote:
It only does nothing IF the players gold equals 0.. |
| 11-09-2003, 12:08 AM | #8 |
im sry but whr cn i get WEU? |
| 11-09-2003, 12:13 AM | #9 |
WEU can be found in the "Warcraft editing Tools" forum... The exact thread is here.. Its my prefered editor, some people like UMSWE which can also be found in the same forum.. you may want to hold off till the next version of WEU, as the current one has a minor problem with multiplayer maps on Bnet (if its the first map loaded it will drop players, but only if its the first map loaded while connected to Bnet..) and PitzerMike says he has that fixed for the next version... Although I have played my Multiplayer maps that were made with his editor just fine... |
