| 03-25-2005, 06:13 PM | #1 |
Okay, I'm making a trigger spell that will allow them to sell the tower to get back all gained resources (later 75%), anyway, here is the way i would LIKE to have it, but for some reason it wont allow me to. Code:
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Sell Tower
Actions
Trigger - Turn off (This trigger)
Player - Add (Point-value of (Casting unit))[color=Red]/2)[/color] to (Owner of (Casting unit)) Current gold
Special Effect - Create a special effect attached to the overhead of (Casting unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Unit - Remove (Casting unit) from the gameHERE'S THE WAY I HAVE IT: Code:
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Sell Tower
Actions
Trigger - Turn off (This trigger)
Player - Add (Point-value of (Casting unit)) to (Owner of (Casting unit)) Current gold
Player - Divert 50% of the Gold income of (Owner of (Casting unit)) to Neutral Passive
Special Effect - Create a special effect attached to the overhead of (Casting unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Unit - Remove (Casting unit) from the game
Why wont it work? :( |
| 03-25-2005, 06:16 PM | #2 |
Does it even sell the unit? Maybe the point value of the unit is incorrect. |
| 03-25-2005, 06:30 PM | #3 |
Yes it does, but the point value should be just fine. I went to this website for help http://www.world-editor-tutorials.th...t/towerdef.php |
| 03-25-2005, 06:32 PM | #4 |
Ok, i fixed it. I went onto the properties of the unit and changed the point value from 100 to 50. Thx anyway |
| 03-26-2005, 04:05 AM | #5 | |
Quote:
as for your first trigger, you want in the 'how much to give field' first select Arithmetic and then set (Point-value of (Casting unit)) / 2 as for why what you did didn't work, diverting 50% of the gold income means that 50% of any gold the player MINES from a goldmine will be sent to neutral |
