HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Leveling A Custom Spell?

08-07-2004, 08:33 PM#1
Arkidas
Hi,Im trying to make a spell called the rise of fire. When its casted it creates 6 units called 'Fire' in the selected area. (that uses the doodad cinematic fire model) but with each level of the ability I need to create new and new units(cause the fire gets more damage) but theres no trigger: units begins casting ability *level*,its just unit begins casting ability,so please can anyone help me?
08-07-2004, 08:45 PM#2
MattPaintballer
Yup. First of all, you might want to use "unit finishes casting an ability." In the quote box is what your triggers should look similar to.
Quote:
Rise of Fire Level 1
Events
A unit finishes casting an ability.
Conditions
Ability equal to "Rise of Fire."
Actions
(This is an if then else, I don't know if it's multiple actions or not.)
If level of "Rise of Fire" equal to 1, then create 6 "Fire" at rect FireCreate, else Run Trigger "Rise of Fire Level 2"

Rise of Fire Level 2
Events
A unit finishes casting an ability.
Conditions
Ability equal to "Rise of Fire."
Actions
(This is an if then else, I don't know if it's multiple actions or not.)
If level of "Rise of Fire" equal to 2, then create 7 "Fire" at rect FireCreate, else Run Trigger "Rise of Fire Level 3"

Rise of Fire Level 3
Events
A unit finishes casting an ability.
Conditions
Ability equal to "Rise of Fire."
Actions
(This is an if then else, I don't know if it's multiple actions or not.)
If level of "Rise of Fire" equal to 3, then create 8 "Fire" at rect FireCreate, else Run Trigger "Rise of Fire Level 4"

So on and so forth. I don't know if this will work or not, I have not tested it.
08-07-2004, 09:18 PM#3
Arkidas
I cant find that level of ability equal to conditon
08-07-2004, 09:28 PM#4
Eeporgorg
Or you could base your spell off of feral spirit, set however many levels you want, change the unit for each level to different kinds of fire, and change the number of summoned. Plus the expiration timer, Also, put immolation and Locust on the fire units.
08-07-2004, 10:10 PM#5
Vexorian
Quote:
Originally Posted by Ultimate-Demon
I cant find that level of ability equal to conditon
IT is in integer comparission
08-08-2004, 12:51 AM#6
Arkidas
hmm ok I have made teh code, but the fires arent spawning,do you see any bugs I dont see?
Code:
Rise Of Fire
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to Rise Of Fire 
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 1
            Then - Actions
                Unit - Create 6 Firelvl1 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 2
                    Then - Actions
                        Unit - Create 6 Firelvl2 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 3
                            Then - Actions
                                Unit - Create 6 Firelvl3 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 4
                                    Then - Actions
                                        Unit - Create 6 Firelvl4 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 5
                                            Then - Actions
                                                Unit - Create 6 Firelvl5 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 5
                                                    Then - Actions
                                                        Unit - Create 6 Firelvl5 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                                                    Else - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 6
                                                            Then - Actions
                                                                Unit - Create 6 Firelvl6 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                                                            Else - Actions
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    If - Conditions
                                                                        (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 7
                                                                    Then - Actions
                                                                        Unit - Create 6 Firelvl7 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                                                                    Else - Actions
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                            If - Conditions
                                                                                (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 8
                                                                            Then - Actions
                                                                                Unit - Create 6 Firelvl8 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                                                                            Else - Actions
                                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                    If - Conditions
                                                                                        (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 9
                                                                                    Then - Actions
                                                                                        Unit - Create 6 Firelvl9 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                                                                                    Else - Actions
                                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                            If - Conditions
                                                                                                (Pick (Casting unit) and get his skill level for Rise Of Fire ) Equal to 10
                                                                                            Then - Actions
                                                                                                Unit - Create 6 Firelvl10 for (Owner of (Target unit of ability being cast)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
                                                                                            Else - Actions
                                                                                                Do nothing
08-08-2004, 03:52 AM#7
MysticGeneral
HOLY GOD. I ain't reading that stuff. Use loops man.
08-08-2004, 07:32 AM#8
Anitarf
Man, just base the spell on a freaking inferno, you don't need any triggers then.

Otherwise, here's your problem (one of them, anyway): when you create the fires, you use (Owner of (Target unit of ability being cast)), instead of (Owner of (Casting unit))

Oh, there is another one: "finishes casting an ability" doesn't have event responses such as "target point of ability being cast". You must use the event "starts the effect of an ability".

And another thing: here's a lot faster way to do this:

Code:
Events:
    Map initialization
Conditions:
Actions:
    Set UnitTypeVariableArray[1] = FireLvl1
    Set UnitTypeVariableArray[2] = FireLvl2
    Set UnitTypeVariableArray[3] = FireLvl3
    .....
    Set UnitTypeVariableArray[10] = FireLvl10
Code:
Events:
    Unit starts the effect of an ability
Conditions:
    Ability being cast equal to Rise of Fire
Actions:
    Create 6 UnitTypeVariableArray[(level of Rise of Fire for (casting unit))] at (target point of ability being cast)

But I say again, just use the inferno spell to summon teh firez and you don't need any trigger at all.