HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detecting Abilities

08-19-2004, 01:58 AM#1
sweet5
well in this new patch they gave us set ability lvl triggers which I made a work around to and was almost done with it when the patch was released so that pisses me off but uh how do u decect if a unit has say banish lvl 1?
08-19-2004, 02:10 AM#2
weaaddar
you use Integer Comparision-Unit Ability Level
08-19-2004, 02:12 AM#3
sweet5
heh, yeah I just found that and tried it but didnt work, Im working on debugging it, maybe u can help me figure it out faster tho ^_^


Code:
Hero Ability Gain
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Banish
            Then - Actions
                Unit - Add Banish to (Hero manipulating item)
                Unit - Set Level of Banish for (Triggering unit) to 1
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Banish
                (Level of Banish for (Triggering unit)) Equal to 1
            Then - Actions
                Unit - Set Level of Banish for (Triggering unit) to 2
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Banish
                (Level of Banish for (Triggering unit)) Equal to 2
            Then - Actions
                Unit - Set Level of Banish for (Triggering unit) to 3
            Else - Actions
                Do nothing
08-19-2004, 02:27 AM#4
sweet5
bah I see it, its doing exactly what I told it to do, if ability = lvl 1 set = 2, if ability = lvl 2 set =3 dah, how can I get around this!?!!??
08-19-2004, 02:43 AM#5
sweet5
heh tripple post but I figured it out!!


Code:
Hero Ability Gain
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Banish
                (Level of Banish for (Hero manipulating item)) Equal to 0
            Then - Actions
                Unit - Add Banish to (Hero manipulating item)
                Unit - Set Level of Banish for (Triggering unit) to 1
                Game - Display to (All players) the text: Lvl 1 trigger
                Skip remaining actions
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Banish
                (Level of Banish for (Hero manipulating item)) Equal to 1
            Then - Actions
                Unit - Set Level of Banish for (Triggering unit) to 2
                Game - Display to (All players) the text: Lvl 2 trigger
                Skip remaining actions
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Banish
                (Level of Banish for (Hero manipulating item)) Equal to 2
            Then - Actions
                Unit - Set Level of Banish for (Triggering unit) to 3
                Game - Display to (All players) the text: Lvl 3 trigger
                Skip remaining actions
            Else - Actions
                Do nothing
08-19-2004, 02:55 AM#6
weaaddar
Gee wiliker I wish these boards has a button that allowed you to revise your posting...oh wait they do its called edit. Don't tripple post unless you know it actually is required.