Projectile System: Doesn't work

Leazy

You can change this now in User CP.
Reaction score
50
Hello, I have a ability called ''Shoot'' where the hero shoots an arrow (a dummy unit) which will travel to the target point, damaging the first unit in its way. Since I will have many spells with a fast traveling dummy unit I made a system:

Trigger:
  • Projectile Movement
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- Setup Which Units --------
      • Set General_Unitgroup[1] = (Units of type Missile: Shoot)
      • Set General_Unitgroup[2] = (Units of type Mortar Team)
      • Set General_Unitgroup[3] = (Units of type Flying Machine)
      • -------- Pick all units --------
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in General_Unitgroup[(Integer A)] and do (Actions)
            • Loop - Actions
              • Set General_Point[1] = (Position of (Picked unit))
              • Set General_Point[2] = (General_Point[1] offset by (Real((Custom value of (Picked unit)))) towards (Facing of (Picked unit)) degrees)
              • Set General_Unitgroup[100] = (Units within (Real((Point-value of General_Unit[1]))) of General_Point[2] matching (((Matching unit) is alive) Equal to True))
              • Set General_Unit[1] = (Picked unit)
              • Trigger - Run Projectile Movement DMG <gen> (checking conditions)
              • Custom script: call RemoveLocation (udg_General_Point[1])
              • Custom script: call RemoveLocation (udg_General_Point[2])
          • Custom script: call DestroyGroup(udg_General_Unitgroup[bj_forLoopAIndex])


Note that the line:
Code:
Trigger - Run Projectile Movement DMG <gen> (checking conditions)
Doesn't affect the movement when turned on/off and is only for DMGing the unit, so that's not the cause of the problem.

The ability ''Shoot'' starts like this:

Trigger:
  • Shoot
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shoot
    • Actions
      • Set General_Point[1] = (Position of (Triggering unit))
      • Set General_Point[2] = (Target point of ability being cast)
      • Set General_Point[3] = (General_Point[1] offset by 30.00 towards (Angle from General_Point[1] to General_Point[2]) degrees)
      • Unit - Create 1 Missile: Shoot for (Owner of (Triggering unit)) at General_Point[3] facing General_Point[2]
      • Unit - Add a 7.00 second Generic expiration timer to (Last created unit)
      • Unit - Set the custom value of (Last created unit) to 20
      • Custom script: call RemoveLocation (udg_General_Point[1])
      • Custom script: call RemoveLocation (udg_General_Point[2])
      • Custom script: call RemoveLocation (udg_General_Point[3])


What can be the cause of the problem? The dummy unit doesn't move anything at all. +rep to the one who can help.
 

nabbig2

New Member
Reaction score
43
It may be because I am deprived of sleep, or my inexperience, but I don't see any way you are ordering the dummy to be moved.
 

Leazy

You can change this now in User CP.
Reaction score
50
Lol! Imbaresing mistake, looked through the trigger at least 10 times and didn't think of that :p +rep ^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top