- Joined
- Jan 31, 2010
- Messages
- 3,552
Hey there. I have red a tutorial () and created the system which allows you to buy abilities from item shops, but I encountered some issues. Whenever I try to buy an ability, the trigger works, but it always gives me one ability - Frost Arrows. I am open for solution on how to make it work.
Since this is taken entirely from this tutorial: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/buying-abilitys-37965/, maybe someone should contact the current Tutorial Moderator in order to fix that.
*I contacted the moderator.
-
Set Variables
-
Events
- Map initialization
- Conditions
-
Actions
- Set Skill[0] = Searing Arrows
- Set Skill[1] = Frost Arrows
- Set Skill[2] = Black Arrows
- Set Items[0] = Searing Arrows
- Set Items[1] = Frost Arrows
- Set Items[2] = Black Arrows
-
Events
-
Acquires Item
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-class of (Item being manipulated)) Equal to Powerup
-
Actions
-
For each (Integer A) from 0 to 2, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Items[(Integer A)] Equal to (Item-type of (Item being manipulated))
- (Level of Skill[(Player number of (Owner of (Triggering unit)))] for (Triggering unit)) Less than 1
-
Then - Actions
- Game - Display to (All players) for 6.00 seconds the text: ((Name of (Owner of (Triggering unit))) + ( has bought + (Name of (Item being manipulated))))
- Unit - Add Skill[(Player number of (Owner of (Triggering unit)))] to (Triggering unit)
- Skip remaining actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Skill[(Player number of (Owner of (Triggering unit)))] for (Triggering unit)) Less than 20
-
Then - Actions
- Game - Display to (All players) for 6.00 seconds the text: ((Name of (Owner of (Triggering unit))) + ( upgraded + (Name of (Item being manipulated))))
- Unit - Set level of Skill[(Player number of (Owner of (Triggering unit)))] for (Triggering unit) to ((Level of Skill[(Player number of (Owner of (Triggering unit)))] for (Triggering unit)) + 1)
- Skip remaining actions
-
Else - Actions
- Game - Display to (All players) for 6.00 seconds the text: Skill is at maximum...
- Skip remaining actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 0 to 2, do (Actions)
-
Events
*I contacted the moderator.