• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Another Trigger Problem 0.o

Status
Not open for further replies.
Level 8
Joined
Mar 5, 2011
Messages
199
I have another problem. This spell trigger's damage does not work..I got this spell from the marvel vs capcom spells made by nerovesper

  • Shadow Dash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Dash
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SB_Integers[0] Equal to 0
        • Then - Actions
          • Trigger - Turn on Shadow Dash Loop <gen>
        • Else - Actions
      • Set SB_Integers[0] = (SB_Integers[0] + 1)
      • Set SB_Integers[1] = (SB_Integers[1] + 1)
      • Set SB_Caster[SB_Integers[1]] = (Triggering unit)
      • Set SB_Point[SB_Integers[1]] = (Position of SB_Caster[SB_Integers[1]])
      • Set MVC_Point[0] = (Target point of ability being cast)
      • Set SB_Angle[SB_Integers[1]] = (Angle from SB_Point[SB_Integers[1]] to MVC_Point[0])
      • -------- ------------------------SETUP------------------------ --------
      • -------- Set below the damage of the spell per interval --------
      • Set SB_Damage[SB_Integers[1]] = (175.00 x (Real((Level of (Ability being cast) for SBCaster[SB_Integers[1]]))))
      • -------- Set below the distance of the spell's effect --------
      • Set SB_Distance[SB_Integers[1]] = 700.00
      • -------- Intervals of the damage --------
      • Set SB_Interval[SB_Integers[1]] = 0.12
      • -------- Spell Speed --------
      • Set SB_Speed[SB_Integers[1]] = 40.00
      • -------- Dummy Unit --------
      • Set MVC_UnitType[5] = Shadow Dash
      • -------- END OF SETUP --------
      • Set SB_CountMove[SB_Integers[1]] = 0.00
      • Set SB_Check[SB_Integers[1]] = True
      • Custom script: call RemoveLocation (udg_MVC_Point[0])
Shadow Dash Loop

  • Shadow Dash Loop
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SB_Integers[2]) from 1 to SB_Integers[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SB_Check[SB_Integers[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SB_CountMove[SB_Integers[2]] Less than SB_Distance[SB_Integers[2]]
                • Then - Actions
                  • Set SB_CountMove[SB_Integers[2]] = (SB_CountMove[SB_Integers[2]] + SB_Speed[SB_Integers[2]])
                  • Set SB_Timer[SB_Integers[2]] = (SB_Timer[SB_Integers[2]] + 0.04)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SB_Timer[SB_Integers[2]] Greater than or equal to SB_Interval[SB_Integers[2]]
                    • Then - Actions
                      • Set SB_Timer[SB_Integers[2]] = 0.00
                      • Set MVC_Point[0] = (SB_Point[SB_Integers[2]] offset by SB_CountMove[SB_Integers[2]] towards SB_Angle[SB_Integers[2]] degrees)
                      • Unit - Create 1 MVC_UnitType[5] for (Owner of SB_Caster[SB_Integers[2]]) at MVC_Point[0] facing SB_Angle[SB_Integers[2]] degrees
                      • Set RAS_Dummy = (Last created unit)
                      • Set RAS_Duration = 1.20
                      • Set RAS_HeightInc = True
                      • Set RAS_Color = 0.00
                      • Trigger - Run Remove Dummy <gen> (checking conditions)
                      • Animation - Play RAS_Dummy's spell slam animation
                      • Set MVC_PickGroup = (Units within 110.00 of MVC_Point[0] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of SB_Caster[SB_Integers[2]])) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching
                      • Unit Group - Pick every unit in MVC_PickGroup and do (Actions)
                        • Loop - Actions
                          • Set MVC_Point[1] = (Position of (Picked unit))
                          • Set MVC_Point[2] = (MVC_Point[1] offset by (SB_Speed[SB_Integers[2]] x (SB_Interval[SB_Integers[2]] / 0.04)) towards SB_Angle[SB_Integers[2]] degrees)
                          • Unit - Move (Picked unit) instantly to MVC_Point[2]
                          • Unit - Cause SB_Caster[SB_Integers[2]] to damage (Picked unit), dealing SB_Damage[SB_Integers[2]] damage of attack type Spells and damage type Universal
                          • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • Custom script: call RemoveLocation (udg_MVC_Point[1])
                          • Custom script: call RemoveLocation (udg_MVC_Point[2])
                      • Custom script: call DestroyGroup (udg_MVC_PickGroup)
                      • Custom script: call RemoveLocation (udg_MVC_Point[0])
                    • Else - Actions
                • Else - Actions
                  • Set SB_Check[SB_Integers[2]] = False
                  • Set SB_Timer[SB_Integers[2]] = 0.00
                  • Custom script: call RemoveLocation (udg_SB_Point[udg_SB_Integers[2]])
                  • Set SB_Integers[0] = (SB_Integers[0] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SB_Integers[0] Equal to 0
                    • Then - Actions
                      • Set SB_Integers[1] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions
 
Ok, I found the problem. In the map, you have two variables, SBCaster[] and SB_Caster[]. In the damage configuration, you have
  • Set SB_Damage[SB_Integers[1]] = (175.00 x (Real((Level of (Ability being cast) for SBCaster[SB_Integers[1]]))))
when your casting unit is saved as
  • Set SB_Caster[SB_Integers[1]] = (Triggering unit)
The first one uses SBCaster[], and the second one uses SB_Caster[]. Change it to SB_Caster[] (the SB_Damage[] variable) and it will work.
 
Status
Not open for further replies.
Top