• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] spell dont fucking work (simple)

Status
Not open for further replies.
Level 9
Joined
Jan 14, 2008
Messages
366
  • arcanesorceress holybomb
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Holy bomb
    • Actions
      • Set Temp_Point = (Target point of ability being cast)
      • Special Effect - Create a special effect at Temp_Point using TheHolyBomb.mdx
      • Special Effect - Destroy (Last created special effect)
      • Unit Group - Pick every unit in (Units within 250.00 of Temp_Point matching (((Owner of (Matching unit)) Equal to (Player(1))) or (((Owner of (Matching unit)) Equal to Player 2 (Blue)) or (((Owner of (Matching unit)) Equal to Player 3 (Teal)) or (((Owner of (Matching unit)) Equal to Player and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Holy bomb for (Casting unit)) Equal to 1
            • Then - Actions
              • Wait 0.30 seconds
              • Advanced - Heal (Picked unit) for 125.00 hitpoints
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Holy bomb for (Casting unit)) Equal to 2
                • Then - Actions
                  • Wait 0.30 seconds
                  • Advanced - Heal (Picked unit) for 250.00 hitpoints
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Holy bomb for (Casting unit)) Equal to 3
                    • Then - Actions
                      • Wait 0.30 seconds
                      • Advanced - Heal (Picked unit) for 400.00 hitpoints
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Holy bomb for (Casting unit)) Equal to 4
                        • Then - Actions
                          • Wait 0.30 seconds
                          • Advanced - Heal (Picked unit) for 550.00 hitpoints
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Holy bomb for (Casting unit)) Equal to 5
                            • Then - Actions
                              • Wait 0.30 seconds
                              • Advanced - Heal (Picked unit) for 700.00 hitpoints
                            • Else - Actions
      • Unit Group - Pick every unit in (Units within 250.00 of Temp_Point matching (((Owner of (Matching unit)) Equal to Player 11 (Dark Green)) or ((Owner of (Matching unit)) Equal to Player 12 (Brown)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Holy bomb for (Casting unit)) Equal to 1
            • Then - Actions
              • Wait 0.30 seconds
              • Unit - Cause (Casting unit) to damage (Picked unit), dealing 125.00 damage of attack type Spells and damage type Normal
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Holy bomb for (Casting unit)) Equal to 2
                • Then - Actions
                  • Wait 0.30 seconds
                  • Unit - Cause (Casting unit) to damage (Picked unit), dealing 250.00 damage of attack type Spells and damage type Normal
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Holy bomb for (Casting unit)) Equal to 3
                    • Then - Actions
                      • Wait 0.30 seconds
                      • Unit - Cause (Casting unit) to damage (Picked unit), dealing 400.00 damage of attack type Spells and damage type Normal
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Holy bomb for (Casting unit)) Equal to 4
                        • Then - Actions
                          • Wait 0.30 seconds
                          • Unit - Cause (Casting unit) to damage (Picked unit), dealing 550.00 damage of attack type Spells and damage type Normal
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Holy bomb for (Casting unit)) Equal to 5
                            • Then - Actions
                              • Wait 0.30 seconds
                              • Unit - Cause (Casting unit) to damage (Picked unit), dealing 700.00 damage of attack type Spells and damage type Normal
                            • Else - Actions
      • Custom script: call RemoveLocation (udg_Temp_Point)
its really pissing me off because it worked, then i changd NOTHING, then it stopped working and now i cant figure it out. . . . .

any help appreciated
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
First of all,, damage first, before healing, otherwise, units with full health will be damaged..
Second of all,, use Triggering Unit, Casting unit will be deleted after wait, Triggering unit wont.
Third of all,, There is a formula in you heal/damage-amount (except for lvl 1)
Fourth of all, with this formula it will become much easier and shorter.

  • Wait 0.30 seconds
  • Pick every unit in (your unit group)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of (Ability being cast) for (Triggering unit)) Equal to 1
      • Then - Actions
        • Advanced - Damage (Picked Unit) for 125.00 hitpoints
      • Else - Actions
        • Set Heal_Damage = (((Real((Level of (Ability being cast) for (Triggering unit)))) x 100.00) + ((Real(((Level of (Ability being cast) for (Triggering unit)) - 1))) x 50.00))
        • Advanced - Damage (Picked Unit) for Heal_Damage hitpoints
  • Wait 0.30 seconds
  • Pick every unit in (Your unit group) and do
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of (Ability being cast) for (Triggering unit)) Equal to 1
      • Then - Actions
        • Advanced - Heal (Picked Unit) for 125.00 hitpoints
      • Else - Actions
        • Set Heal_Damage = (((Real((Level of (Ability being cast) for (Triggering unit)))) x 100.00) + ((Real(((Level of (Ability being cast) for (Triggering unit)) - 1))) x 50.00))
        • Advanced - Heal (Picked Unit) for Heal_Damage hitpoints
 
Level 9
Joined
Jan 14, 2008
Messages
366
love how you give a totally arrogant pseudo-helpful comment

wich doesnt at any fucking all.

and now you stop giving input because you cant help.
but being a douche, thats no problem, that you have time for.
 
Level 5
Joined
Oct 17, 2006
Messages
151
1st:

Dont be a flamer just cuz you dont have an answer at the time you need it. No one NEEDS to give you an answer so stfu...

2nd:

The problem is indeed your unit group.

Instead of making that whole long unit group set custom unit groups to allies and enemies (im presuming that your healing all allies around the guy and all enemies around the guy)

so it would look like this:
  • Temp
    • Events
    • Conditions
    • Actions
      • Set allies = (All allies of (Owner of (Casting unit)))
      • Set enemies = (All enemies of (Owner of (Casting unit)))
      • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Casting unit)) matching (((Matching player) is in allies) Equal to True)) and do (Actions)
        • Loop - Actions
After the loop you do all the fun stuff...
 
Level 7
Joined
Jul 20, 2008
Messages
377
Yeah, that's the #1 thing I noticed about the OP's trigger, waits in loops are bad (you usually don't even need to use waits in loops...).
 
Status
Not open for further replies.
Top