View Single Post
Old 04-25-2006, 10:24 PM   #2 (permalink)
Galmore
BattleForums Newbie
 
Join Date: Apr 2006
Posts: 11
:dance :dance :dance Ok i figured a work around

Ability_For_Player[]
Ability_Level_For_Player[]
these are arrays one is an array of Abilitys and the other is just an array of numbers to represent the level for that ability

First i have a shop sell an item .. each item when aquired will fire a trigger to set ether ability 1 2 or 3 to that abilitys

then i have a trigger for when the hero levels and u chose an ability to level here it is


Code:
Learn Abilitys Trigger
    Events
        Unit - A unit Learns a skill
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Learned Hero Skill) Equal to Ability 1 
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Alility_Level_for_player[((Player number of (Owner of (Triggering unit))) + 1)] Equal to 0
                    Then - Actions
                        Unit - Add Ability_For_Player[((Player number of (Owner of (Triggering unit))) + 1)] to (Triggering unit)
                        Set Alility_Level_for_player[((Player number of (Owner of (Triggering unit))) + 1)] = (Alility_Level_for_player[((Player number of (Owner of (Triggering unit))) + 1)] + 1)
                        Unit - Remove Ability 1  from (Triggering unit)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Alility_Level_for_player[((Player number of (Owner of (Triggering unit))) + 1)] Not equal to 3
                            Then - Actions
                                Game - Display to (All players controlled by a ((Owner of (Triggering unit)) controller) player) the text: You have incressed ...
                                Unit - Increase level of Ability_For_Player[((Player number of (Owner of (Triggering unit))) + 1)] for (Triggering unit)
                                Set Alility_Level_for_player[((Player number of (Owner of (Triggering unit))) + 1)] = (Alility_Level_for_player[((Player number of (Owner of (Triggering unit))) + 1)] + 1)
                                Unit - Remove Ability 1  from (Triggering unit)
                            Else - Actions
                                Game - Display to (All players controlled by a ((Owner of (Triggering unit)) controller) player) the text: Sorry This Ability ...
                                Unit - Remove Ability 1  from (Triggering unit)
                                Hero - Modify unspent skill points of (Triggering unit): Add 1 points
            Else - Actions

so this is my work around .... well if anyone has questions about it ill try to help ya :dance
Galmore is offline   Reply With Quote