mylemonblue
You can change this now in User CP.
- Reaction score
- 7
I have several abilities that I want to grant bonus gold to the player if he/she kills a unit with that ability. e.g If a firebolt spell was the cause of death, the casting player gets 10 extra gold in addition to the normal bounty.
Well, at first I tried using the Chest of Gold ability, and that didn't work. (I tried adding it to the hero, should I have just forced a Gold Coin item into it's inventory?)
I then tried this trigger to give the bonus gold, but it doesn't work. Is this only possible in JASS, or am I doing something wrong? If it's JASS specific, some pointers here and there and I think I can handle it (I'm trying to make the transition from GUI to JASS anyway )
Well, at first I tried using the Chest of Gold ability, and that didn't work. (I tried adding it to the hero, should I have just forced a Gold Coin item into it's inventory?)
I then tried this trigger to give the bonus gold, but it doesn't work. Is this only possible in JASS, or am I doing something wrong? If it's JASS specific, some pointers here and there and I think I can handle it (I'm trying to make the transition from GUI to JASS anyway )
Trigger:
- RaptorStrike Bonus
- Events
- Unit - A unit Finishes casting an ability
- Conditions
- Multiple ConditionsAnd - All (Conditions) are true
- Conditions
- (Ability being cast) Equal to (==) Raptor Strike
- ((Target unit of ability being cast) is A structure) Equal to (==) False
- (Level of Marker for (Target unit of ability being cast)) Equal to (==) 0
- Conditions
- Multiple ConditionsAnd - All (Conditions) are true
- Actions
- Custom script: local unit casting = GetSpellAbilityUnit()
- Custom script: local unit targ = GetSpellTargetUnit()
- Custom script: set udg_Caster = casting
- Custom script: set udg_Temp_Unit = targ
- Countdown Timer - Start spell_timer as a One-shot timer that will expire in 0.30 seconds
- Set spell_timer = (Last started timer)
- Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Integer((Life of Temp_Unit))) Equal to (==) 0
- Then - Actions
- Countdown Timer - Destroy spell_timer
- Special Effect - Create a special effect attached to the overhead of Caster using UI\Feedback\GoldCredit\GoldCredit.mdl
- Special Effect - Destroy (Last created special effect)
- Player - Add (10 x (Level of Raptor Strike for Caster)) to (Owner of Caster) Current gold
- Custom script: set targ = null
- Custom script: set udg_Temp_Unit = null
- Custom script: set udg_Caster = null
- Custom script: set casting = null
- Else - Actions
- Do nothing
- If - Conditions
- Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events