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

Fire Beam Spell - Remove Waits

Level 21
Joined
Mar 16, 2008
Messages
962
Hi, I'm trying to edit this spell to:

1) remove the Waits (I tried to do this but all the delays were messed up and the entire spell seems to go off at the same time).
2) getting rid of the custom script stuff and just replacing with an integer counter.
3) get rid of some of the functions that could be replaced by PN variables to make trigger more efficient.
4) keep/make it MPI.
5) make it cause friendly fire but not self damage (I was able to do this on my own).
6) and destroy all destructible (I was able to do this on my own).

  • SPELL
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Beam (Fire Beam) (R)
    • Actions
      • -------- DON'T TOUCH THIS, UNLESS YOUR KNOW WHAT YOU ARE DOING --------
      • Custom script: local integer locExecCount = GetTriggerExecCount(GetTriggeringTrigger())
      • Custom script: if locExecCount == 50 then
      • Custom script: call ResetTrigger(GetTriggeringTrigger())
      • Custom script: endif
      • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Set VariableSet FB_CasterUnit[FB_TriggerExecCount] = (Triggering unit)
      • Unit - Pause FB_CasterUnit[FB_TriggerExecCount]
      • For each (Integer FB_Integer[FB_TriggerExecCount]) from 1 to 10, do (Actions)
        • Loop - Actions
          • Animation - Change FB_CasterUnit[FB_TriggerExecCount]'s vertex coloring to (((Real(FB_Integer[FB_TriggerExecCount])) x 10.00)%, 0.00%, 0.00%) with 0.00% transparency
          • Set VariableSet FB_OrbPoint[FB_TriggerExecCount] = ((Position of FB_CasterUnit[FB_TriggerExecCount]) offset by 100.00 towards ((Real(FB_Integer[FB_TriggerExecCount])) x 36.00) degrees.)
          • Unit - Create 1 Dummy (fire beam import) for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_OrbPoint[FB_TriggerExecCount] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_FB_OrbPoint[udg_FB_TriggerExecCount])
          • Animation - Change (Last created unit)'s size to (200.00%, 200.00%, 200.00%) of its original size
          • Unit - Add a (CONFIG_ChargeWait + 1.00) second Generic expiration timer to (Last created unit)
          • Wait 0.01 seconds
          • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Wait CONFIG_ChargeWait seconds
      • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Set VariableSet FB_CasterPos[FB_TriggerExecCount] = (Position of FB_CasterUnit[FB_TriggerExecCount])
      • Unit - Create 1 Dummy (fire beam import) for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_CasterPos[FB_TriggerExecCount] facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_FB_CasterPos[udg_FB_TriggerExecCount])
      • Animation - Change (Last created unit)'s size to (200.00%, 200.00%, 200.00%) of its original size
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Animation - Play FB_CasterUnit[FB_TriggerExecCount]'s spell animation
      • Set VariableSet FB_Integer[FB_TriggerExecCount] = 0
      • For each (Integer FB_Integer[FB_TriggerExecCount]) from 1 to CONFIG_BeamNumber, do (Actions)
        • Loop - Actions
          • Set VariableSet FB_OrbPoint[FB_TriggerExecCount] = ((Position of FB_CasterUnit[FB_TriggerExecCount]) offset by (CONFIG_BeamDistance x (Real(FB_Integer[FB_TriggerExecCount]))) towards (Facing of FB_CasterUnit[FB_TriggerExecCount]) degrees.)
          • Unit - Create 1 Medium Royal House 2 for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_OrbPoint[FB_TriggerExecCount] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_FB_OrbPoint[udg_FB_TriggerExecCount])
          • Set VariableSet FB_LastCreated[FB_TriggerExecCount] = (Last created unit)
          • Set VariableSet FB_LastCreatedPos[FB_TriggerExecCount] = (Position of FB_LastCreated[FB_TriggerExecCount])
          • Unit - Add a ((((CONFIG_BeamDistance x (Real(CONFIG_BeamNumber))) x 0.50) / 100.00) - 0.10) second Generic expiration timer to FB_LastCreated[FB_TriggerExecCount]
          • Animation - Change FB_LastCreated[FB_TriggerExecCount]'s size to (200.00%, 200.00%, 300.00%) of its original size
          • Set VariableSet FB_DamageGroup[FB_TriggerExecCount] = (Units within CONFIG_BeamDmgDistance of FB_LastCreatedPos[FB_TriggerExecCount] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of FB_CasterUnit[FB_TriggerExecCount]).) Equal to True)).)
          • Unit Group - Pick every unit in FB_DamageGroup[FB_TriggerExecCount] and do (Actions)
            • Loop - Actions
              • Unit - Cause FB_CasterUnit[FB_TriggerExecCount] to damage (Picked unit), dealing ((CONFIG_BeamDmg x (Real((Level of Metamorphosis (Illidan) for FB_CasterUnit[FB_TriggerExecCount])))) + 50.00) damage of attack type Hero and damage type Fire
          • Custom script: call DestroyGroup(udg_FB_DamageGroup[udg_FB_TriggerExecCount])
          • Wait 0.00 seconds
          • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Special Effect - Create a special effect at FB_CasterPos[FB_TriggerExecCount] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create 1 Royal General for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_LastCreatedPos[FB_TriggerExecCount] facing Default building facing degrees
      • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 Small Royal House 1 for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_LastCreatedPos[FB_TriggerExecCount] facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_FB_LastCreatedPos[udg_FB_TriggerExecCount])
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Set VariableSet FB_DamageGroup[FB_TriggerExecCount] = (Units within 500.00 of (Position of (Last created unit)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of FB_CasterUnit[FB_TriggerExecCount]).) Equal to True)).)
      • Unit Group - Pick every unit in FB_DamageGroup[FB_TriggerExecCount] and do (Actions)
        • Loop - Actions
          • Unit - Cause FB_CasterUnit[FB_TriggerExecCount] to damage (Picked unit), dealing ((CONFIG_ExplosionDmg x (Real((Level of Metamorphosis (Illidan) for FB_CasterUnit[FB_TriggerExecCount])))) + 50.00) damage of attack type Hero and damage type Fire
      • Custom script: call DestroyGroup(udg_FB_DamageGroup[udg_FB_TriggerExecCount])
      • Wait 0.50 seconds
      • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Unit - Unpause FB_CasterUnit[FB_TriggerExecCount]
      • Animation - Change FB_CasterUnit[FB_TriggerExecCount]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Animation - Reset FB_CasterUnit[FB_TriggerExecCount]'s animation

  • SPELL
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Beam (Fire Beam) (R)
    • Actions
      • -------- DON'T TOUCH THIS, UNLESS YOUR KNOW WHAT YOU ARE DOING --------
      • Custom script: local integer locExecCount = GetTriggerExecCount(GetTriggeringTrigger())
      • Custom script: if locExecCount == 50 then
      • Custom script: call ResetTrigger(GetTriggeringTrigger())
      • Custom script: endif
      • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Set VariableSet FB_CasterUnit[FB_TriggerExecCount] = (Triggering unit)
      • Unit - Pause FB_CasterUnit[FB_TriggerExecCount]
      • For each (Integer FB_Integer[FB_TriggerExecCount]) from 1 to 10, do (Actions)
        • Loop - Actions
          • Animation - Change FB_CasterUnit[FB_TriggerExecCount]'s vertex coloring to (((Real(FB_Integer[FB_TriggerExecCount])) x 10.00)%, 0.00%, 0.00%) with 0.00% transparency
          • Set VariableSet FB_OrbPoint[FB_TriggerExecCount] = ((Position of FB_CasterUnit[FB_TriggerExecCount]) offset by 100.00 towards ((Real(FB_Integer[FB_TriggerExecCount])) x 36.00) degrees.)
          • Unit - Create 1 Orb (fire beam import) for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_OrbPoint[FB_TriggerExecCount] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_FB_OrbPoint[udg_FB_TriggerExecCount])
          • Animation - Change (Last created unit)'s size to (200.00%, 200.00%, 200.00%) of its original size
          • Unit - Add a (CONFIG_ChargeWait + 1.00) second Generic expiration timer to (Last created unit)
          • Wait 0.01 seconds
          • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Wait CONFIG_ChargeWait seconds
      • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Set VariableSet FB_CasterPos[FB_TriggerExecCount] = (Position of FB_CasterUnit[FB_TriggerExecCount])
      • Unit - Create 1 Start Effect1 (fire beam import) for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_CasterPos[FB_TriggerExecCount] facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_FB_CasterPos[udg_FB_TriggerExecCount])
      • Animation - Change (Last created unit)'s size to (200.00%, 200.00%, 200.00%) of its original size
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Animation - Play FB_CasterUnit[FB_TriggerExecCount]'s spell animation
      • Set VariableSet FB_Integer[FB_TriggerExecCount] = 0
      • For each (Integer FB_Integer[FB_TriggerExecCount]) from 1 to CONFIG_BeamNumber, do (Actions)
        • Loop - Actions
          • Set VariableSet FB_OrbPoint[FB_TriggerExecCount] = ((Position of FB_CasterUnit[FB_TriggerExecCount]) offset by (CONFIG_BeamDistance x (Real(FB_Integer[FB_TriggerExecCount]))) towards (Facing of FB_CasterUnit[FB_TriggerExecCount]) degrees.)
          • Unit - Create 1 Beam (fire beam import) for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_OrbPoint[FB_TriggerExecCount] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_FB_OrbPoint[udg_FB_TriggerExecCount])
          • Set VariableSet FB_LastCreated[FB_TriggerExecCount] = (Last created unit)
          • Set VariableSet FB_LastCreatedPos[FB_TriggerExecCount] = (Position of FB_LastCreated[FB_TriggerExecCount])
          • Unit - Add a ((((CONFIG_BeamDistance x (Real(CONFIG_BeamNumber))) x 0.50) / 100.00) - 0.10) second Generic expiration timer to FB_LastCreated[FB_TriggerExecCount]
          • Animation - Change FB_LastCreated[FB_TriggerExecCount]'s size to (200.00%, 200.00%, 300.00%) of its original size
          • -------- Edited to include friendly targets but not caster --------
          • Set VariableSet FB_DamageGroup[FB_TriggerExecCount] = (Units within CONFIG_BeamDmgDistance of FB_LastCreatedPos[FB_TriggerExecCount] matching ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to FB_CasterUnit[FB_TriggerExecCount])).)
          • -------- end edit --------
          • Unit Group - Pick every unit in FB_DamageGroup[FB_TriggerExecCount] and do (Actions)
            • Loop - Actions
              • Unit - Cause FB_CasterUnit[FB_TriggerExecCount] to damage (Picked unit), dealing ((CONFIG_BeamDmg x (Real((Level of Metamorphosis (Illidan) for FB_CasterUnit[FB_TriggerExecCount])))) + 50.00) damage of attack type Hero and damage type Fire
          • Custom script: call DestroyGroup(udg_FB_DamageGroup[udg_FB_TriggerExecCount])
          • -------- Edited to kill trees --------
          • Set VariableSet extra_FB_point = FB_LastCreatedPos[FB_TriggerExecCount]
          • Destructible - Pick every destructible within CONFIG_BeamDistance of extra_FB_point and do (Actions)
            • Loop - Actions
              • Destructible - Kill (Picked destructible)
          • Custom script: call RemoveLocation(udg_extra_FB_point)
          • -------- end edit --------
          • Wait 0.00 seconds
          • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Special Effect - Create a special effect at FB_CasterPos[FB_TriggerExecCount] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create 1 Explosion Effect1 (fire beam import) for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_LastCreatedPos[FB_TriggerExecCount] facing Default building facing degrees
      • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 Explosion Effect2 (fire beam import) for (Owner of FB_CasterUnit[FB_TriggerExecCount]) at FB_LastCreatedPos[FB_TriggerExecCount] facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_FB_LastCreatedPos[udg_FB_TriggerExecCount])
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Set VariableSet FB_DamageGroup[FB_TriggerExecCount] = (Units within 500.00 of (Position of (Last created unit)) matching ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to FB_CasterUnit[FB_TriggerExecCount])).)
      • Unit Group - Pick every unit in FB_DamageGroup[FB_TriggerExecCount] and do (Actions)
        • Loop - Actions
          • Unit - Cause FB_CasterUnit[FB_TriggerExecCount] to damage (Picked unit), dealing ((CONFIG_ExplosionDmg x (Real((Level of Metamorphosis (Illidan) for FB_CasterUnit[FB_TriggerExecCount])))) + 50.00) damage of attack type Hero and damage type Fire
      • Custom script: call DestroyGroup(udg_FB_DamageGroup[udg_FB_TriggerExecCount])
      • -------- Edited to kill trees --------
      • Set VariableSet extra_FB_point = (Position of (Last created unit))
      • Destructible - Pick every destructible within 500.00 of extra_FB_point and do (Actions)
        • Loop - Actions
          • Destructible - Kill (Picked destructible)
      • Custom script: call RemoveLocation(udg_extra_FB_point)
      • -------- end edit --------
      • Wait 0.50 seconds
      • Custom script: set udg_FB_TriggerExecCount = locExecCount
      • Unit - Unpause FB_CasterUnit[FB_TriggerExecCount]
      • Animation - Change FB_CasterUnit[FB_TriggerExecCount]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Animation - Reset FB_CasterUnit[FB_TriggerExecCount]'s animation

Could anyone at least help me come up with a general plan to get rid of the waits? That's my main concern.
 
Last edited:

Rheiko

Spell Reviewer
Level 27
Joined
Aug 27, 2013
Messages
4,214
I would just make it from scratch, lol.

There are location leak here
  • Set VariableSet FB_OrbPoint[FB_TriggerExecCount] = ((Position of FB_CasterUnit[FB_TriggerExecCount]) offset by 100.00 towards ((Real(FB_Integer[FB_TriggerExecCount])) x 36.00) degrees.)
and here
  • Set VariableSet FB_OrbPoint[FB_TriggerExecCount] = ((Position of FB_CasterUnit[FB_TriggerExecCount]) offset by (CONFIG_BeamDistance x (Real(FB_Integer[FB_TriggerExecCount]))) towards (Facing of FB_CasterUnit[FB_TriggerExecCount]) degrees.)

this will kill "all" destructibles, including bridges and other stuffs.
  • Destructible - Pick every destructible within 500.00 of extra_FB_point and do (Actions)
    • Loop - Actions
      • Destructible - Kill (Picked destructible)
unless, that is really intentional as you said. If you want to destroy only trees, then: GUI and JASS IsDestTree v1.3

You can recreate this using dynamic indexing / hashtable / linked list + periodic timer.

Logic goes something like this:
Index -> Run timer -> Use counter to check for delay -> Create each effect when the time arrives -> Deindex when done.

You can also try systems such as Timed Effect v1.1 , Timed Special Effect v1.8.1 , Timed Special Effect Linked List v2.2 but they require you to learn how to use them.
I personally would just recreate this from scratch as I will have more control over everything then.
 
Last edited:
Level 21
Joined
Mar 16, 2008
Messages
962
Oh i figured it would clear the correct point since it was cleared a mere 2-3 lines later before the array variable was updated.

There are clearly a lot of problems with this spell and I’m not very good with triggers. That’s why I’m posting and asking for help. Things like “start from scratch” or “this is leaking” without even giving a vague tip on how to fix it are not helpful nor appreciated.
 

Rheiko

Spell Reviewer
Level 27
Joined
Aug 27, 2013
Messages
4,214
Could anyone at least help me come up with a general plan to get rid of the waits? That's my main concern
You were looking for a plan to get rid of waits as it is your main concern and I gave you the plan.

There is not much you can do about it. Either you keep using waits or you have to replace them entirely with timer as I previously mentioned (which will have to rely on the methods I mentioned earlier or a unit indexer) and as you can probably already tell, it's not as simple as it seems because you will need a complete make over of the spell.

Unless someone's willing to go that far, then you'll have to do it yourself. I gave you the general idea on how to approach it.

In addition to the things I have previously mentioned, maybe this one can also be helpful: MUI Triggers with Waits
 
Level 21
Joined
Mar 16, 2008
Messages
962
Well I tried for a few hours and made no progress besides breaking the spell. So I made this post. That's why I'm asking. Maybe something like "you can get rid of the wait by cutting that part into a separate trigger and put a timer at the end of that trigger with an integer counter that the timer when the counter reaches 10" or something idk exactly. I'm not trying to be rude but your replies are too advanced for me to understand or just reference some system that I don't want to use. So they aren't very helpful. Sorry.

Either way I've already moved past this Fire Beam system. I don't want to use the Fire Beam because the triggers are questionable. I'm just going to replace it with your Destructive Sphere, which doesn't have any questionable functions and is much easier to import and configure. Regarding Destructive Sphere, could I have permission to edit it to increase the ranks? Would you happen to have a comment regarding increasing the ranks to 5 total?
 

Rheiko

Spell Reviewer
Level 27
Joined
Aug 27, 2013
Messages
4,214
Well I tried for a few hours and made no progress besides breaking the spell. So I made this post. That's why I'm asking. Maybe something like "you can get rid of the wait by cutting that part into a separate trigger and put a timer at the end of that trigger with an integer counter that the timer when the counter reaches 10" or something idk exactly. I'm not trying to be rude but your replies are too advanced for me to understand or just reference some system that I don't want to use. So they aren't very helpful. Sorry.
I'm sorry I can't help much then. I tried to recreate it myself but it was far from done. I will continue working on it during my spare time.

Either way I've already moved past this Fire Beam system. I don't want to use the Fire Beam because the triggers are questionable. I'm just going to replace it with your Destructive Sphere, which doesn't have any questionable functions and is much easier to import and configure. Regarding Destructive Sphere, could I have permission to edit it to increase the ranks? Would you happen to have a comment regarding increasing the ranks to 5 total?
Feel free to do so. :)
 
Level 21
Joined
Mar 16, 2008
Messages
962
It's ok don't worry about Fire Beam anymore. I already deleted Fire Beam from my map and replaced it with Destructive Sphere.

Do you think I could simply add and 4th and 5th array to the configuration of Destructive Sphere? or will it might be more complicated than that?
 

Rheiko

Spell Reviewer
Level 27
Joined
Aug 27, 2013
Messages
4,214
Do you think I could simply add and 4th and 5th array to the configuration of Destructive Sphere?
Yes, as simple as that. You can add 4th and 5th array to some of the configuration variables, only those that have 1 to 3 array, as they represent value per level. Aside from those variables, you shouldn't because they wouldn't work.

Hopefully the documentation is clear enough to understand. Feel free to ask if you have any problem with it.
 
I would just make it from scratch, lol.

There are location leak here
  • Set VariableSet FB_OrbPoint[FB_TriggerExecCount] = ((Position of FB_CasterUnit[FB_TriggerExecCount]) offset by 100.00 towards ((Real(FB_Integer[FB_TriggerExecCount])) x 36.00) degrees.)
and here
  • Set VariableSet FB_OrbPoint[FB_TriggerExecCount] = ((Position of FB_CasterUnit[FB_TriggerExecCount]) offset by (CONFIG_BeamDistance x (Real(FB_Integer[FB_TriggerExecCount]))) towards (Facing of FB_CasterUnit[FB_TriggerExecCount]) degrees.)

this will kill "all" destructibles, including bridges and other stuffs.
  • Destructible - Pick every destructible within 500.00 of extra_FB_point and do (Actions)
    • Loop - Actions
      • Destructible - Kill (Picked destructible)
unless, that is really intentional as you said. If you want to destroy only trees, then: GUI and JASS IsDestTree v1.3

You can recreate this using dynamic indexing / hashtable / linked list + periodic timer.

Logic goes something like this:
Index -> Run timer -> Use counter to check for delay -> Create each effect when the time arrives -> Deindex when done.

You can also try systems such as Timed Effect v1.1 , Timed Special Effect v1.8.1 , Timed Special Effect Linked List v2.2 but they require you to learn how to use them.
I personally would just recreate this from scratch as I will have more control over everything then.
Just want to chip in that Almia's Timed Effect, as far as I am aware, not meant for spell creation. The reason mine is possible to create spell with is because of the extreme amount of parameters that allows triggers to slip in
 
Top