Triggering Levelable spells?

Toriad

New Member
Reaction score
4
Is there an easier way to get this same effect? In gui

like make it so that when you level up an ability the dummys auto learn the same level dummy ability.

Code:
ShatterEarth
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Shatter Earth 
    Actions
        Wait 0.25 seconds
        Set Temp_Caster = (Casting unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 1
            Then - Actions
                Set Temp_Int = 0
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 2
            Then - Actions
                Set Temp_Int = 0
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 3
            Then - Actions
                Set Temp_Int = 1
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 4
            Then - Actions
                Set Temp_Int = 2
            Else - Actions
        Set Temp_Point = (Position of Temp_Caster)
        Unit - Create 1 Dummy Unit for (Owner of Temp_Caster) at (Temp_Point offset by 200.00 towards (Facing of Temp_Caster) degrees) facing ((Facing of Temp_Caster) + 30.00) degrees
        Unit - Add ShatterEarth(Dummy)  to (Last created unit)
        Set Temp_Point = (Position of (Last created unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 1
            Then - Actions
                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 1
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 2
            Then - Actions
                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 2
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 3
            Then - Actions
                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 3
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 4
            Then - Actions
                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 4
            Else - Actions
        Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Temp_Point offset by 200.00 towards ((Facing of (Last created unit)) + 30.00) degrees)
        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        Unit Group - Add (Last created unit) to Temp_GroupArray[0]
        Set Temp_Point = (Position of Temp_Caster)
        Unit - Create 1 Dummy Unit for (Owner of Temp_Caster) at (Temp_Point offset by 200.00 towards (Facing of Temp_Caster) degrees) facing ((Facing of Temp_Caster) - 30.00) degrees
        Unit - Add ShatterEarth(Dummy)  to (Last created unit)
        Set Temp_Point = (Position of (Last created unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 1
            Then - Actions
                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 1
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 2
            Then - Actions
                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 2
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 3
            Then - Actions
                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 3
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Shatter Earth  for Temp_Caster) Equal to 4
            Then - Actions
                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 4
            Else - Actions
        Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Temp_Point offset by 200.00 towards ((Facing of (Last created unit)) - 30.00) degrees)
        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        Unit Group - Add (Last created unit) to Temp_GroupArray[0]
        For each (Integer A) from 0 to Temp_Int, do (Actions)
            Loop - Actions
                Wait 0.25 seconds
                Unit Group - Pick every unit in Temp_GroupArray[(Integer A)] and do (Actions)
                    Loop - Actions
                        Set Temp_Point = (Position of (Picked unit))
                        Unit - Create 1 Dummy Unit for (Owner of Temp_Caster) at (Temp_Point offset by 200.00 towards (Facing of (Picked unit)) degrees) facing ((Facing of (Picked unit)) + 30.00) degrees
                        Unit - Add ShatterEarth(Dummy)  to (Last created unit)
                        Set Temp_Point = (Position of (Last created unit))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Shatter Earth  for Temp_Caster) Equal to 1
                            Then - Actions
                                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 1
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Shatter Earth  for Temp_Caster) Equal to 2
                            Then - Actions
                                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 2
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Shatter Earth  for Temp_Caster) Equal to 3
                            Then - Actions
                                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 3
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Shatter Earth  for Temp_Caster) Equal to 4
                            Then - Actions
                                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 4
                            Else - Actions
                        Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Temp_Point offset by 200.00 towards ((Facing of (Last created unit)) + 30.00) degrees)
                        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                        Unit Group - Add (Last created unit) to Temp_GroupArray[((Integer A) + 1)]
                        Set Temp_Point = (Position of (Picked unit))
                        Unit - Create 1 Dummy Unit for (Owner of Temp_Caster) at (Temp_Point offset by 200.00 towards (Facing of (Picked unit)) degrees) facing ((Facing of (Picked unit)) - 30.00) degrees
                        Unit - Add ShatterEarth(Dummy)  to (Last created unit)
                        Set Temp_Point = (Position of (Last created unit))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Shatter Earth  for Temp_Caster) Equal to 1
                            Then - Actions
                                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 1
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Shatter Earth  for Temp_Caster) Equal to 2
                            Then - Actions
                                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 2
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Shatter Earth  for Temp_Caster) Equal to 3
                            Then - Actions
                                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 3
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Shatter Earth  for Temp_Caster) Equal to 4
                            Then - Actions
                                Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to 4
                            Else - Actions
                        Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Temp_Point offset by 200.00 towards ((Facing of (Last created unit)) - 30.00) degrees)
                        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                        Unit Group - Add (Last created unit) to Temp_GroupArray[((Integer A) + 1)]
        For each (Integer A) from 0 to 3, do (Actions)
            Loop - Actions
                Unit Group - Remove all units of Temp_GroupArray[(Integer A)] from Temp_GroupArray[(Integer A)]
 

vypur85

Hibernate
Reaction score
803
Hmmm... I don't really understand what you're doing (it's a long trigger :p). Why not use:

Code:
Unit - Set Unit - Set level of ShatterEarth(Dummy)  for (Last created unit) to [B](Level of Shatter Earth for (Triggering unit))[/B]

Is this what you want? And I don't think your trigger might work. Using wait then setting variable might not be a good idea. To make it MUI, try using this:

Code:
    Actions
        Wait 0.25 seconds
        Set Temp_Caster = ([B]Triggering[/B] unit)

And you have another wait in the integer loop. Waits are not good to make something MUI. Sometimes, it won't even work.
 

Toriad

New Member
Reaction score
4
I wont have to worry about MUI, because this is a hero ability, and only one person can be a hero at a time... So if i got that right, MUI wont be an issue? correct?
 

vypur85

Hibernate
Reaction score
803
Nope. MUI won't be an issue.

Waits are not good to make something MUI. Sometimes, it won't even work.

But it's also important to ensure that your trigger works in the first place. Some Event Responses (such as Casting unit, Target unit ability being cast... etc etc) will not make it past waits. Always use 'Triggering unit' whenever possible. Whenever not possible, set them into variables before the wait. Then use the variable later in the remaining actions.

Example:
This may not work
Code:
    Actions
        Wait 0.25 seconds
        Set Temp_Caster = (Casting unit)

This may work
Code:
    Actions
        Set Temp_Caster = (Casting unit)
        Wait 0.25 seconds
 

Toriad

New Member
Reaction score
4
Thats what I try to do :) and all of these spells work. Cept for the ultimate, because no one can tell me how to make a unit appear half underground :( but once thats done I will have completed 1 hero outta 20 completely :)

Also is there a way to unleak a position of Blah without using variables, because I dont want to make 100 Temp_Points and then clear them all.. :(
 

vypur85

Hibernate
Reaction score
803
> unleak a position of Blah without using variables

Not possible. Could be possible for Unit Group though. But I advice using variables instead.


> I dont want to make 100 Temp_Points

No problem in this. Variables can be used over and over again. I'm quite sure in a single trigger, you only need around 3 point variables. So, you just need to create 3 point variables with different names. These variables can be used in other trigger as well without causing any problems. Just copy and paste the removal scripts here and there.


> appear half underground

This is not possible via trigger. You cannot 'bury' a unit or making a unit fly into the ground. But you can create a unit who is initially underground. You just need to set the Flying Height and Minimum Flying Height to a negative value. When you create the unit, they appear underground.
 

Toriad

New Member
Reaction score
4
is there an easy way to change the model of a unit? So I could make a dummy unit, hide the hero, change dummy unit model into the hero, bury the dummy then morph it back with the damage?
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Have it originally with the model, then to make it appear a dummy. You can set it's trans to 100%, and remove shadow.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top