- Joined
- Mar 21, 2014
- Messages
- 79
Hi everyone,
I wrote a script in order to learn a hero a new ability.
What it should do:
If the dialog button is clicked (where the player chooses his ability),
the new ability should be learned by the hero. He has to be able to improve this ability up to level 4, when leveling.
Problems: If I use "Modify unspent Skill of Hero: Add+1" and "Learn Skill" (as seen in the code),
the hero does not learn any ability.
If I use "Add Ability", the hero learns the spell, but can't improve it by leveling.
Here is my code:
I wrote a script in order to learn a hero a new ability.
What it should do:
If the dialog button is clicked (where the player chooses his ability),
the new ability should be learned by the hero. He has to be able to improve this ability up to level 4, when leveling.
Problems: If I use "Modify unspent Skill of Hero: Add+1" and "Learn Skill" (as seen in the code),
the hero does not learn any ability.
If I use "Add Ability", the hero learns the spell, but can't improve it by leveling.
Here is my code:
[trigger="spell"]Quest3x3
Events
Dialog - A dialog button is clicked for Spell
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[6]
Then - Actions
Selection - Select Held for Player 2 (Blue)
Trigger - Turn on Quest3x2 <gen>
Else - Actions
Trigger - Turn off (This trigger)
Trigger - Turn off Quest3x2 <gen>
Hero - Modify unspent skill points of Held: Add 1 points
Set HeroSpellStartLevel = (Hero level of Held)
Selection - Select Held for Player 2 (Blue)
Special Effect - Destroy Ausrufezeichen[3]
Unit - Remove BCK from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[1]
Then - Actions
Hero - Learn skill for Held: Critical Strike
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[2]
Then - Actions
Hero - Learn skill for Held: Healing Wave (Hero)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[3]
Then - Actions
Hero - Learn skill for Held: Chain Lightning (Hero)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[4]
Then - Actions
Hero - Learn skill for Held: Frost Armor (Hero)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[5]
Then - Actions
Hero - Learn skill for Held: Immolation (Hero)
Else - Actions
Do nothing
[/trigger]
Events
Dialog - A dialog button is clicked for Spell
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[6]
Then - Actions
Selection - Select Held for Player 2 (Blue)
Trigger - Turn on Quest3x2 <gen>
Else - Actions
Trigger - Turn off (This trigger)
Trigger - Turn off Quest3x2 <gen>
Hero - Modify unspent skill points of Held: Add 1 points
Set HeroSpellStartLevel = (Hero level of Held)
Selection - Select Held for Player 2 (Blue)
Special Effect - Destroy Ausrufezeichen[3]
Unit - Remove BCK from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[1]
Then - Actions
Hero - Learn skill for Held: Critical Strike
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[2]
Then - Actions
Hero - Learn skill for Held: Healing Wave (Hero)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[3]
Then - Actions
Hero - Learn skill for Held: Chain Lightning (Hero)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[4]
Then - Actions
Hero - Learn skill for Held: Frost Armor (Hero)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to SpellButton[5]
Then - Actions
Hero - Learn skill for Held: Immolation (Hero)
Else - Actions
Do nothing
[/trigger]