[Trigger] Fixing trigger

Status
Not open for further replies.
Level 4
Joined
Jan 14, 2017
Messages
75
This trigger does not work when I cast my spell. I intended the spell to be like this (without the fireball part):

Here are the triggers. I created the spell in BPower's missile GUI map (Missile [GUI] version 1.6.1).

  • Explosion Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Explosion
    • Actions
      • Set Missile__TempLoc = (Target point of ability being cast)
      • -------- --- --------
      • Set Missile__Source = (Triggering unit)
      • Set Missile__Owner = (Triggering player)
      • Set Missile__Origin = (Position of Missile__Source)
      • Set Missile__Impact = (Target point of ability being cast)
      • Set Missile__ImpactZ = 50.00
      • Set Missile__OriginZ = 50.00
      • Set Missile__Speed = 500.00
      • Set Missile__Arc = 45.00
      • Set Missile__Collision = 48.00
      • Set Missile__Model = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
      • Set Missile__Data = 1
      • Set Missile__OnCollideUnit = Fireball Actions <gen>
      • Set Missile__OnRemove = Fireball Actions <gen>
      • Trigger - Run Missile Configurate <gen> (ignoring conditions)
      • Custom script: call RemoveLocation(udg_Missile__TempLoc)

  • Explosion Actions
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Missile__EventId Equal to EVENT_MISSILE_REMOVE
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Missile__Data Equal to 1
            • Then - Actions
              • Set Missile__TempLoc = (Position of Missile__Dummy)
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Trigger - Run Missile Configurate <gen> (ignoring conditions)
                  • Set Missile__Origin = (Point((X of Missile__TempLoc), (Y of Missile__TempLoc)))
                  • Set Missile__ImpactZ = 50.00
                  • Set Missile__Height = 350.00
                  • Set Missile__OriginZ = 50.00
                  • Set Missile__Speed = 500.00
                  • Set Missile__Damage = 150.00
                  • Set Missile__Source = Missile_Source[Missile__EventIndex]
                  • Set Missile__Owner = Missile_Owner[Missile__EventIndex]
                  • Set Missile__Model = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
                  • Set Missile__OnCollideUnit = Fireball Actions <gen>
                  • Set Missile__Data = 2
                  • Trigger - Run Missile Configurate <gen> (ignoring conditions)
              • Custom script: call RemoveLocation(udg_Missile__TempLoc)
              • Custom script: set udg_Missile__TempLoc = null
            • Else - Actions
              • Set Missile__TempLoc = (Position of Missile__Dummy)
              • Set Temp_Group = (Units within 1000.00 of Missile__TempLoc matching ((((Matching unit) belongs to an enemy of Missile__Owner) Equal to True) and (((Matching unit) is alive) Equal to True)))
              • Unit Group - Pick every unit in Temp_Group and do (Actions)
                • Loop - Actions
                  • Unit - Cause Missile__Source to damage (Picked unit), dealing Missile__Damage damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect at Missile__TempLoc using Abilities\Spells\Other\Doom\DoomDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call DestroyGroup(udg_Temp_Group)
                  • Custom script: call RemoveLocation(udg_Missile__TempLoc)
                  • Custom script: set udg_Missile__TempLoc = null
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Missile__EventId Equal to EVENT_MISSILE_COLLIDE_UNIT
              • (Missile__UnitHit belongs to an enemy of Missile__Owner) Equal to True
              • (Missile__UnitHit is alive) Equal to True
            • Then - Actions
              • Unit - Cause Missile__Source to damage Missile__UnitHit, dealing Missile__Damage damage of attack type Normal and damage type Normal
              • Set Missile__WantDestroy = True
            • Else - Actions
 
Level 4
Joined
Jan 14, 2017
Messages
75
I got an error when I did what you said. I got this error (it popped up when I cast Explosion in-game).

Error in Trigger Missile
Function: Missile_Launch
Object: Missile_Index
Index: 0
Description: Attempt to launch invalid missile index!
Make sure you Run Missile Configurate <gen> - Your missile settings - Run Missile <gen> syntax.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
This is how it is descibed on the Missile [GUI] page.

Create a missiles via Run Missile Configuration <gen> - Set missile properties - Run Missile <gen> syntax.
For example like here in my Fireball trigger:

  • Fireball Cast
    • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Fireball
  • Actions
    • Set Missile__TempLoc = (Target point of ability being cast)
    • -------- --------
    • Trigger - Run Missile Configurate <gen> (ignoring conditions)
    • Set Missile__Source = (Triggering unit)
    • Set Missile__Owner = (Triggering player)
    • Set Missile__Origin = (Position of Missile__Source)
    • Set Missile__Impact = (Missile__Origin offset by 550.00 towards (Angle from Missile__Origin to Missile__TempLoc) degrees)
    • Set Missile__ImpactZ = 50.00
    • Set Missile__OriginZ = 50.00
    • Set Missile__Speed = 500.00
    • Set Missile__Model = Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
    • Trigger - Run Missile <gen> (ignoring conditions)
    • -------- --------
    • Custom script: call RemoveLocation(udg_Missile__TempLoc)

You need to first use run Missile Configurate, then set all the varaibles and then run Missile.
 
Status
Not open for further replies.
Top