• 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.

Unit-Jumping Flame Spell

Status
Not open for further replies.
Level 4
Joined
Jul 23, 2007
Messages
129
Hey guys, me again. Having trouble with my fire spell. It is supposed to light a unit on fire for 8 seconds, dealing 20 damage per second, and then (if the unit is still alive) detonate and do AOE damage. Upon detonation, I want a 20% chance that another unit within a 200 range of the original target will catch on fire.

I use 2 spells, 4 variables, and 2 triggers:

Spells
Draining Flames: Primary spell built off of doom. Deals 20/dmg per sec for 8 seconds. Summons no units.
Draining Flames (Dummy version): No cooldown, no mana cost verion of above the spell with a 200 range. Designed to allow my flames to 'jump' to other units.

Variables:
DrainFlameTarget - Unit variable to identify the target currently on fire.
DrainFlameDummy - Unit variable to identify the dummy caster.
DrainFlameJumpCount - Integer variable used to count how many times draining flames has jumped (used to prevent it from jumping more than 3 times).
DrainFlameLevel - integer variable that tracks what level the spell is at.

Triggers:
Flames: Is supposed to assign the target of the spell to a variable as well as reseting the jump count variable.
Flames2: Deals aoe damage from location of drainflametarget as well as causing the flames to jump if drainflametarget is still alive.
Here are my triggers:
  • Flames
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • ((Ability being cast) Equal to Draining Flames ) or ((Ability being cast) Equal to Draining Flames (Dummy Version))
    • Actions
      • Set DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Draining Flames
        • Then - Actions
          • Set DrainFlameJumpCount[(Player number of (Triggering player))] = 0
          • Leaderboard - Change the value for Player 6 (Orange) in (Last created leaderboard) to DrainFlameJumpCount[(Player number of (Owner of (Triggering unit)))]
        • Else - Actions
          • Do nothing
AND...

  • Flames 2
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • ((Ability being cast) Equal to Draining Flames ) or ((Ability being cast) Equal to Draining Flames (Dummy Version))
    • Actions
      • Wait 8.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DrainFlameLevel[(Player number of (Owner of (Triggering unit)))] Equal to 1
        • Then - Actions
          • Unit - Cause DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] to damage circular area after 0.00 seconds of radius 200.00 at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]), dealing 220.00 damage of attack type Spells and damage type Fire
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DrainFlameLevel[(Player number of (Owner of (Triggering unit)))] Equal to 2
        • Then - Actions
          • Unit - Cause DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] to damage circular area after 0.00 seconds of radius 200.00 at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]), dealing 300.00 damage of attack type Spells and damage type Fire
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DrainFlameLevel[(Player number of (Owner of (Triggering unit)))] Equal to 3
        • Then - Actions
          • Unit - Cause DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] to damage circular area after 0.00 seconds of radius 200.00 at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]), dealing 380.00 damage of attack type Spells and damage type Fire
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DrainFlameLevel[(Player number of (Owner of (Triggering unit)))] Equal to 4
        • Then - Actions
          • Unit - Cause DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] to damage circular area after 0.00 seconds of radius 200.00 at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]), dealing 460.00 damage of attack type Spells and damage type Fire
        • Else - Actions
          • Do nothing
      • Special Effect - Create a special effect attached to the origin of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
      • Special Effect - Create a special effect attached to the origin of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] is dead) Equal to False
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 100
              • DrainFlameJumpCount[(Player number of (Owner of (Triggering unit)))] Less than 3
            • Then - Actions
              • Set DrainFlameJumpCount[(Player number of (Triggering player))] = (DrainFlameJumpCount[(Player number of (Owner of (Triggering unit)))] + 1)
              • Unit - Create 1 Dummy for PLY_Players[(Player number of (Owner of (Triggering unit)))] at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]) facing (Position of (Triggering unit))
              • Set DrainFlameDummy[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
              • Wait 0.20 seconds
              • Unit - Order DrainFlameDummy[(Player number of (Owner of (Triggering unit)))] to Neutral Pit Lord - Doom (Random unit from (Units within 200.00 of (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))])))
              • Game - Display to (All players) the text: THE FLAMES HAVE JUM...
              • Leaderboard - Change the value for Player 6 (Orange) in (Last created leaderboard) to DrainFlameJumpCount[(Player number of (Owner of (Triggering unit)))]
              • Wait 1.00 seconds
              • Unit - Remove DrainFlameDummy[(Player number of (Owner of (Triggering unit)))] from the game
            • Else - Actions
              • Do nothing
        • Else - Actions
          • Do nothing
As far as I can tell, this should work; however, sometimes it works and sometimes not (I am testing on a group of closley packed units that are unable to move, so it is not a matter of them being too far away for the dummy spell to reach). Sometimes it does not detonate on the first cast, even if the unit does not die. When it does detonate, sometimes it doesn't light another unit on fire even though I have it set to 100% chance at the moment and I get the 'Flames have jumped' message.

Finally, sometimes it does work right. When this happens, however, it does not detonate on the second unit; the flames just fizzle out after 8 seconds and do not jump again.

I would greatly appreciate (and give rep to) anyone who helps. :) Thanks.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Hm yes.. your triggers looks very much more complicated than they should do. I've actually made a similiar spell like this (but still yet not the same).

Your trigger is as well containing several leaks, but after this thread they all are going to be fixed :)

-> First of all, I would add a "learn" trigger:
Note; If there are only one hero who can have the ability at the same time, you dont need arrays. but I suppose you can, otherwise you wouldnt have done that right?
  • Draining Flames Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Draining Flames
    • Actions
      • Set DF_learn[(Player number of (Owner of (Learning Hero)))] = (DF_learn[(Player number of (Owner of (Learning Hero)))] + 1)
-> Then I would make several changes about the casting trigger
-> The event: Unit - A unit Begins casting an ability is for me considered unreliable, and I have noticed that its not always working.
Use: Unit - A unit Starts the effect of an ability instead
-> The w8 actions can simply cause a the trigger to screw up. Sure it w8s 8 seconds of doing what it shall, but if the ability is casted too fast (as it could do when your dummy unit casts it) it can lead to misunderstanding in the script. Also this is only working properly when playing it 1 player. You will notice that things could stop working later if you play it with several players in game.
-> The level check you have made with those if (=1,2,3,4) can drastically be used in a much scriptfriendly and faster way. See below how I made:
-> (I suppose the leaderbboard you have made, is just a way to check that the jumps goes right?)
-> Since w8 actions and timers cant help us localise who the casting player is after 8 seconds, I would create a dummy unit (I would suggest a completely new dummy unit to avoid complications with other triggers), and add an expiration timer on him: Among with some more new thingies, the new "Flames" trigger is posted below. (Note: The Counters i've added is simply normal integers allowing us to make the system debugged. They are neccessary to determinate the right spelltargeted unit to blast later.)
  • Flames Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Draining Flames
          • (Ability being cast) Equal to Draining Flames (dummy version)
    • Actions
      • Set DF_count1 = (DF_count1 + 1)
      • Set DF_point1 = (Position of (Casting unit)) //it doesnt really matter where this point are...
      • Set DF_buffunit[DF_count1] = (Target unit of ability being cast)
      • Unit - Create 1 Dummy(special) for (Owner of (Casting unit)) at DF_point1 facing Default building facing degrees
      • Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation( udg_DF_point1 )
then we make the big trigger, to an even smaller one ._.
-> Also note. Damage area is working in the way, that it's damaging every kind of unit in that area, even your own units and allies. (I dont think we want that). An alternative solution is made too.
  • Flames Continue
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Dummy(special)
    • Actions
      • Set DF_count2 = (DF_count2 + 1)
      • Set DF_LimitTargets = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DF_buffunit[DF_count2] is alive) Equal to True
        • Then - Actions
          • Set DF_point2 = (Position of DF_buffunit[DF_count2])
          • Set DF_buffunit[DF_count2] = No unit
          • Set DF_DamageAreaGroup = (Units within 200.00 of DF_point2 matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
          • Unit Group - Pick every unit in DF_DamageAreaGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause (Dying unit) to damage (Picked unit), dealing (160.00 + ((Real(DF_learn[(Player number of (Owner of (Dying unit)))])) x 80.00)) damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup( udg_DF_DamageAreaGroup )
          • Special Effect - Create a special effect at DF_point2 using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at DF_point2 using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set DF_DamageAreaGroup = (Units within 200.00 of DF_point2 matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff YOUR_SPELL_BUFF) Equal to False))))
          • Custom script: call RemoveLocation( udg_ DF_point2 )
          • Unit Group - Pick every unit in DF_DamageAreaGroup and do (Actions)
            • Loop - Actions
              • Set DF_random = (Random integer number between 1 and 5)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DF_random Equal to 1
                  • DF_LimitTargets Less than or equal to 3
                • Then - Actions
                  • Set DF_LimitTargets = (DF_LimitTargets + 1)
                  • Set DF_randomunit = (Random unit from DF_DamageAreaGroup)
                  • Set Set DF_point2 = (Position of DF_randomunit)
                  • Unit - Create 1 Dummy for (Owner of (Dying unit)) at DF_point2 facing Default building facing degrees
                  • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to Neutral Pit Lord - Doom DF_randomunit
                  • Set DF_randomunit = No unit
                  • Custom script: call RemoveLocation( udg_DF_point2 )
                • Else - Actions
              • Unit Group - Remove (Picked unit) from DF_DamageAreaGroup
          • Custom script: call DestroyGroup( udg_DF_DamageAreaGroup )
        • Else - Actions
I think this should cover the whole. Although it looks almost as the same length as your triggers, its not leaking compared to yours;)

It should work. For more questions simply just ask
And also, check that all units has the requirements they need to cast the ability (again). Sometimes its just a single small thingy screwing everything up, unnotisable like a dagger in the dark ._.

/Regards Eccho
 
Level 4
Joined
Jul 23, 2007
Messages
129
Ok, sorry for taking so long to respond. I have sat down twice to draft a long response and both times my broswer wigged out before I could send this message. So here is a short reply so you know I am alive.

Your trigger looks good, and I think I follow it well enough to reproduce it. I won't be able to try for several days (I have a presentation to do on Wed, and a research project due on Sat, followed by another due next week). +REP for you.

Two questions:
What is leaking? I think I have a rough idea, but I havn't had it spelled out to me yet. :(
I don't understand how to use the custom scripts. When I bring up that action in the WE there no default actions for me to choose from.

Many thanks.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Things that leak could be a point or a unit group.

Example when you asks to create a unit on (position of unit) this will cause a leak, because the game itself looses the coordinates of the point and therefor the point is not removed untill after game. This leads to higher memory usage of the map, and its then we experience "laggy maps".
Thats also why we set the point into a variable so that we can remove it manually without creating unnecessary memory space.

Read this thread for more information:
http://www.hiveworkshop.com/forums/showthread.php?t=35124

the custom script action simply means that you have to type the script there yourself, and there is no help. But as said, if you read the thread above, Im sure you understand better.
 
Level 4
Joined
Jul 23, 2007
Messages
129
Note; If there are only one hero who can have the ability at the same time, you dont need arrays. but I suppose you can, otherwise you wouldnt have done that right? /Regards Eccho

Yea, this spell is going to be in a multiplayer map. So, potentially, all players could pick the hero that has this ability.



[/trigger]

The w8 actions can simply cause a the trigger to screw up. Sure it w8s 8 seconds of doing what it shall, but if the ability is casted too fast (as it could do when your dummy unit casts it) it can lead to misunderstanding in the script. Also this is only working properly when playing it 1 player. You will notice that things could stop working later if you play it with several players in game./Regards Eccho

Is this an example of a leak?

I suppose the leaderbboard you have made, is just a way to check that the jumps goes right /Regards Eccho

Yes. I have found that using leaderboards when map testing can help me discover mistakes in my triggers that I may not have noticed easily.

Also note. Damage area is working in the way, that it's damaging every kind of unit in that area, even your own units and allies. (I dont think we want that). /Regards Eccho

Yes! I want it to only damage enemies.

It should work. For more questions simply just ask
And also, check that all units has the requirements they need to cast the ability (again). Sometimes its just a single small thingy screwing everything up, unnotisable like a dagger in the dark ._. /Regards Eccho

Thank you very, very much. I understand what you mean about the daggers in the dark, I have been hit by that sort of thing so many times. One time I had abug on an aos-type map (the same map this spell is for) that would cause the hero-controlled players to attack-move every second or so, preventing you from controlling them effectivley. The odd part was that this only happend if player 4 (purple) was in the game. After months I finally found a single line in a trigger that had (Playable map area) instead of the correct region for one of my spawn-movement triggers. Urgh. I was SO happy when I fixed that.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
w8 actions are not called leaks, since they could work sometimes.
But a w8action inside a trigger made for several events happening "within a small time" could make the trigger unsafe, since it no longer (as example) can determinate the casting unit.
 
Level 4
Joined
Jul 23, 2007
Messages
129
Ack, it doesn't want to work!

Here are my triggers:
  • FlameLevel
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Draining Flames
    • Actions
      • Set DF_Learn[(Player number of (Owner of (Learning Hero)))] = (DF_Learn[(Player number of (Owner of (Learning Hero)))] + 1.00)
  • Flames
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Draining Flames
          • (Ability being cast) Equal to Draining Flames (Dummy Version)
    • Actions
      • Set DF_Count1 = (DF_Count1 + 1)
      • Set DF_Point1 = (Position of (Casting unit))
      • Set DF_buffunit[DF_Count1] = (Target unit of ability being cast)
      • Unit - Create 1 Dummy (timer) for (Owner of (Casting unit)) at DF_Point1 facing (Position of (Triggering unit))
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation( udg_DF_point1 )
  • Flames 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Dummy (timer)
    • Actions
      • Set DF_Count2 = (DF_Count2 + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DF_buffunit[DF_Count2] is alive) Equal to True
        • Then - Actions
          • Set DF_Point2 = (Position of DF_buffunit[DF_Count2])
          • Set DF_buffunit[DF_Count2] = No unit
          • Set DF_DamageAreaGroup = (Units within 200.00 of DF_Point2 matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
          • Unit Group - Pick every unit in DF_DamageAreaGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause (Dying unit) to damage (Picked unit), dealing (160.00 + (DF_Learn[(Player number of (Owner of (Dying unit)))] x 80.00)) damage of attack type Spells and damage type Normal
        • Else - Actions
          • Do nothing
      • Custom script: call DestroyGroup( udg_DF_DamageAreaGroup )
      • Special Effect - Create a special effect at DF_Point2 using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at DF_Point2 using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set DF_DamageAreaGroup = (Units within 200.00 of DF_Point2 matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Triggering unit) has buff Draining Flames (Level 1)) Equal to False))))
      • Custom script: call RemoveLocation ( udg_DF_point2 )
      • Unit Group - Pick every unit in DF_DamageAreaGroup and do (Actions)
        • Loop - Actions
          • Set DF_Random = (Random integer number between 1 and 5)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DF_Random Greater than or equal to 1
            • Then - Actions
              • Set DF_RandomUnit = (Random unit from DF_DamageAreaGroup)
              • Set DF_Point2 = (Position of DF_RandomUnit)
              • Unit - Create 1 Dummy for (Owner of (Casting unit)) at DF_Point1 facing (Position of (Triggering unit))
              • Unit - Order (Last created unit) to Neutral Pit Lord - Doom DF_RandomUnit
              • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
              • Set DF_RandomUnit = No unit
              • Custom script: call RemoveLocation( udg_DF_point2 )
            • Else - Actions
              • Do nothing
          • Unit Group - Remove (Picked unit) from DF_DamageAreaGroup
      • Custom script: call DestroyGroup( udg_DF_DamageAreaGroup )
I left out the jump count for now, because I'm not sure if I want to limit it.

I changed the expiration to 3 seconds because I decided 8 seconds is too long.

I set the integer comparison to 'greater than or equal to 1' so that the flames will jump every time (for testing purposes, I will change it back to 'equal to 1' later.)

I had to disable the custom script lines. Even though I typed them exactly as you had them, the Editor disables the triggers because there is a problem with the custom scripts when I try to test it.

With the custom scripts disabled, the flame will light one unit on fire, detonate and light a second unit on fire but the flames just fizzle out without exploding on the second unit.

Please help!!!
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
First of all, Ignore using "do nothing". They are indeed doing nothing, but since its a fuction, the action "do nothing" will execute doing nothing and just make the trigger slower. No need for "do nothing" :p

Second, try to make everything after the first if condition, in the last trigger, to stand inside the if-function... cause it should do so. Look at my trigger again if your uncertain of what I mean

Maybe that will fix the problem.
/regards
 
Level 4
Joined
Jul 23, 2007
Messages
129
Nope. It isn't working. I had to disable the custom
scripts because the WE automatically disables
the triggers when I run the map unless I disable
the custom scripts.

  • Flames 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Dummy (timer)
    • Actions
      • Set DF_Count2 = (DF_Count2 + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DF_buffunit[DF_Count2] is alive) Equal to True
        • Then - Actions
          • Set DF_Point2 = (Position of DF_buffunit[DF_Count2])
          • Set DF_buffunit[DF_Count2] = No unit
          • Set DF_DamageAreaGroup = (Units within 200.00 of DF_Point2 matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
          • Unit Group - Pick every unit in DF_DamageAreaGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause (Dying unit) to damage (Picked unit), dealing (160.00 + (DF_Learn[(Player number of (Owner of (Dying unit)))] x 80.00)) damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup( udg_DF_DamageAreaGroup )
          • Special Effect - Create a special effect at DF_Point2 using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at DF_Point2 using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set DF_DamageAreaGroup = (Units within 200.00 of DF_Point2 matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Triggering unit) has buff Draining Flames (Level 1)) Equal to False))))
          • Custom script: call RemoveLocation ( udg_DF_point2 )
          • Unit Group - Pick every unit in DF_DamageAreaGroup and do (Actions)
            • Loop - Actions
              • Set DF_Random = (Random integer number between 1 and 5)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DF_Random Greater than or equal to 1
                • Then - Actions
                  • Set DF_RandomUnit = (Random unit from DF_DamageAreaGroup)
                  • Set DF_Point2 = (Position of DF_RandomUnit)
                  • Unit - Create 1 Dummy for (Owner of (Casting unit)) at DF_Point1 facing (Position of (Triggering unit))
                  • Unit - Order (Last created unit) to Neutral Pit Lord - Doom DF_RandomUnit
                  • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                  • Set DF_RandomUnit = No unit
                  • Custom script: call RemoveLocation( udg_DF_point2 )
                • Else - Actions
              • Unit Group - Remove (Picked unit) from DF_DamageAreaGroup
          • Custom script: call DestroyGroup( udg_DF_DamageAreaGroup )
        • Else - Actions
I'm gonna keep trying to make this work. If you see what the problem is, please let me
know and I'll fix it. Thanks!
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
  • Custom script: call RemoveLocation ( udg_DF_point2 )

This custom script has a script error, because there is no point variable called udg_DF_point2
The mistake you have done is simply a small p instead of a P. Change it to
udg_DF_Point2 and it should work (Dont forget to change it in all places where its used)

Never forget that trigger codes are case sensitive, meaning they dont accept a small letter as a big letter.
If the variable is called A it will never be accepted as a

I think there were no other mistakes, as far as I see now, but if you still get an error, make a print screen of the "error window" and show it here.

/Regards
 
Status
Not open for further replies.
Top