• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Where is the problem?

Status
Not open for further replies.
Level 16
Joined
Jun 24, 2009
Messages
1,409
I'm making a spell that should heal the caster and it's minions and damage enemies in it's area. Also when it kills an enemy unit it turns the corpse into a skeleton. But sometimes it just stops doing these things. I can't really find the problem and I'm afraid I have to rewrite the whole spell.

  • Field of Fallen Souls
    • Events
    • Conditions
    • Actions
      • Set TempInt = (Player number of (Triggering player))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KFFHas[KFFLastRecycled] Equal to True
        • Then - Actions
          • Set KFFMax = (KFFMax + 1)
          • Set KFFIndex = KFFMax
        • Else - Actions
          • Set KFFIndex = KFFLastRecycled
          • Set KFFLastRecycled = KFFRecycledList[KFFLastRecycled]
      • Set KFFCaster[KFFIndex] = (Triggering unit)
      • Set KFFHas[KFFIndex] = True
      • Set KFFCount = (KFFCount + 1)
      • Set KFFTargetPoint[KFFIndex] = (Target point of ability being cast)
      • Set KFFTimer[KFFIndex] = (15.00 + (2.00 x (Real((Level of Field of Fallen Souls for KFFCaster[KFFIndex])))))
      • Set KFFDelay[KFFIndex] = 0
      • Set KFFHealDamage[KFFIndex] = (0.10 x (Real(Spellpower[TempInt])))
      • Unit - Create 1 Field Void for Neutral Passive at KFFTargetPoint[KFFIndex] facing Default building facing degrees
      • Set KFFDummy[KFFIndex] = (Last created unit)
      • Animation - Change KFFDummy[KFFIndex]'s animation speed to 20.00% of its original speed
      • Animation - Change KFFDummy[KFFIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Field of Fallen Souls Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Field of Fallen Souls Loop <gen>
        • Else - Actions
  • Field of Fallen Souls Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer KFFInteger) from 0 to KFFMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KFFHas[KFFInteger] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KFFTimer[KFFInteger] Greater than 0.00
                • Then - Actions
                  • Set KFFDelay[KFFInteger] = (KFFDelay[KFFInteger] + 1)
                  • Set KFFTimer[KFFInteger] = (KFFTimer[KFFInteger] - 0.10)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (KFFDelay[KFFInteger] mod 10) Equal to 0
                    • Then - Actions
                      • Set TempLoc = (KFFTargetPoint[KFFInteger] offset by (Random real number between 0.00 and 350.00) towards (Random angle) degrees)
                      • Special Effect - Create a special effect at TempLoc using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation (udg_TempLoc)
                    • Else - Actions
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 400.00 of KFFTargetPoint[KFFInteger] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of and do (Actions)
                    • Loop - Actions
                      • Unit - Cause KFFCaster[KFFInteger] to damage (Picked unit), dealing KFFHealDamage[KFFInteger] damage of attack type Spells and damage type Normal
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is dead) Equal to True
                        • Then - Actions
                          • Set TempLoc2 = (Position of (Picked unit))
                          • Unit - Create 1 Minor Skeleton Warrior for (Owner of KFFCaster[KFFInteger]) at TempLoc2 facing Default building facing degrees
                          • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
                          • Animation - Play (Last created unit)'s birth animation
                          • Special Effect - Create a special effect at TempLoc2 using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • Custom script: call RemoveLocation (udg_TempLoc2)
                          • Unit - Remove (Picked unit) from the game
                        • Else - Actions
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 400.00 of KFFTargetPoint[KFFInteger] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Pl and do (Actions)
                    • Loop - Actions
                      • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + KFFHealDamage[KFFInteger])
                • Else - Actions
                  • Unit - Explode KFFDummy[KFFInteger]
                  • Set KFFCount = (KFFCount - 1)
                  • Set KFFHas[KFFInteger] = False
                  • Custom script: call RemoveLocation (udg_KFFTargetPoint[udg_KFFInteger])
                  • Set KFFRecycledList[KFFInteger] = KFFLastRecycled
                  • Set KFFLastRecycled = KFFInteger
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • KFFCount Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • For each (Integer A) from 0 to KFFMax, do (Set KFFRecycledList[(Integer A)] = 0)
                      • Set KFFLastRecycled = 0
                      • Set KFFMax = 0
                    • Else - Actions
            • Else - Actions
For the ones who want to say these things:
-Bad index recycling system. Learn to trigger MUI.
L_Learn to shut the fuck up if you know shit. The system is okay. It works. But explain me why shouldn't it work with that spell when there are already more than 130 spells in the map using that system

-You're not calling the spells.
L_I do call the spells with a special system that reduces the number of codes triggered when a spell is called. And yes, it works perfectly too.
 
Level 17
Joined
Jul 17, 2011
Messages
1,863
well generally if your map has good unit models, when they die they should turn to skeletons XD if you want to ressurect them use a dummy with raise dead

depends on what kind of heal you want: an instant heal or over time heal

instant heal is very easy

use this

you need some aoe spell to damage the units first then for the heal if you are raising skeletons and want to heal them use "Death coil" for that
if they are not skeletons make shure your raised units are classified as Undead else Death Coil wont work
there are a lot of useful abilities in wc3 that people dont even know of
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
well generally if your map has good unit models, when they die they should turn to skeletons XD if you want to ressurect them use a dummy with raise dead
So you didn't really read through my post.... It already creates skeletons. That's not the problem. The problem is that it sometimes stop healing and damaging. And if the spell won't damage then the skeletons won't be created. It's obvious.

depends on what kind of heal you want: an instant heal or over time heal

instant heal is very easy

use this

you need some aoe spell to damage the units first then for the heal if you are raising skeletons and want to heal them use "Death coil" for that
if they are not skeletons make shure your raised units are classified as Undead else Death Coil wont work
there are a lot of useful abilities in wc3 that people dont even know of

Ahh... a beginner....

If I would create dummy units and give them abilities expiration timers etc. I would greatly increase the used power sources which I don't want. Picking everyone in the area and increasing their health is a better solution. Same to the AoE damage spell.

@Maker Minutes and I'll send the map.
 
Status
Not open for further replies.
Top