• 🏆 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!

New Missile System - 100% GUI

Do you like this system?

  • Yes

    Votes: 5 100.0%
  • No

    Votes: 0 0.0%

  • Total voters
    5
Status
Not open for further replies.
Level 11
Joined
Feb 23, 2009
Messages
577
Hi all, I would like everyone's input on this system I made. It's not entirely finished yet but it seems to be working very well so far.

Trying to get some input before posting it in the spells section.

Thanks!


  • TPMS Instant Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Instant Cast
    • Actions
      • -------- Use ONLY: Instant / Target / Point --------
      • Set TPMS___CastType = Instant
      • -------- --- --------
      • Set TPMS___MissileModel_Path = Abilities\Weapons\SentinelMissile\SentinelMissile.mdl
      • Set TPMS___MissileModel_Size = 1.00
      • -------- How far from the caster will the missile appear --------
      • Set TPMS___LaunchOffset = 30.00
      • -------- We are not using models, so we need to define collision --------
      • Set TPMS___CollisionRadius = 32.00
      • -------- --- --------
      • Set TPMS___Damage_SpecialEffect = Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
      • Set TPMS___Damage_Min = 55.00
      • Set TPMS___Damage_Max = 35.00
      • -------- --- --------
      • Set TPMS___ExtraMissiles = 9
      • -------- Defines the angle at which extra missiles are launched --------
      • Set TPMS___ExtraMissiles_Angle = 18.00
      • -------- Instant Cast is NOT affected by minimum range! --------
      • Set TPMS___Travel_Range_Min = 0.00
      • Set TPMS___Travel_Range_Max = 600.00
      • -------- --- --------
      • Set TPMS___Travel_Speed = 1000.00
      • Set TPMS___Travel_Speed_Accelerate = 0.00
      • -------- --- --------
      • Set TPMS___AoE_SpecialEffect = <Empty String>
      • Set TPMS___AoE_Radius = 0.00
      • Set TPMS___AoE_DamageRatio = 0.00
      • -------- Will the missile explode once it reaches max range? --------
      • Set TPMS___AoE_AtMaxRange = False
      • -------- --- --------
      • Set TPMS___Pierce_MaxTimes = 100
      • Set TPMS___Pierce_Chance = 100.00
      • -------- Defines the damage ratio that a missile will deal after each pierce --------
      • -------- Example: 0.9 will make it deal 90% of the previous damage each pierce --------
      • Set TPMS___Pierce_DamageRatio = 1.00
      • -------- Is a missile that pierces able to apply effects? --------
      • Set TPMS___Pierce_HasEffects = True
      • -------- Do missiles lose effects after piercing? --------
      • Set TPMS___Pierce_LoseEffects = False
      • -------- Will the missile pierce in a straight line or bounce randomly? --------
      • Set TPMS___Pierce_Bounces = True
      • -------- --- --------
      • Set TPMS___Split_Chance = 0.00
      • Set TPMS___Split_Amount = 0
      • Set TPMS___Split_Angle = 0.00
      • -------- Defines the damage / model size of splitting missiles --------
      • Set TPMS___Split_OverallRatio = 0.00
      • Set TPMS___Split_HasEffects = False
      • Set TPMS___Split_AtMaxRange = False
      • -------- This trigger must be run for every cast --------
      • -------- Do not remove --------
      • Trigger - Run TPMS System Go <gen> (checking conditions)
 

Attachments

  • ThisPOT's Missile System V4.w3x
    33.7 KB · Views: 88
Level 11
Joined
Feb 23, 2009
Messages
577
Could you post the triggers for the actual system?

It's split into 10 different triggers (some could be combined but it's easier on the eye at the moment):

Creating the Missiles (On Cast):
- System Go (Prepares everything before creating a missile)
- Missile Create (A loop that creates the missiles)
- Missile Stats (just saves the missile stats)

Missile System (On Timer):
- All the other triggers at the bottom, which can all be combined into one at the end


It's all in the demo map, much easier to look at it directly.

PS: Please let me know if you have time to look at it what you think of it.

-

INIT

  • TPMS Initialize
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set TPMS____Timer_Speed = 0.03

CREATE MISSILE:

  • TPMS System Go
    • Events
    • Conditions
    • Actions
      • Set TPMS___Travel_Speed = (TPMS___Travel_Speed x TPMS____Timer_Speed)
      • Set TPMS___Travel_Speed_Accelerate = (TPMS___Travel_Speed_Accelerate x TPMS____Timer_Speed)
      • -------- --- --------
      • Set TPMS_Boolean[1] = False
      • Set TPMS_Boolean[2] = False
      • Set TPMS_Integer[1] = 0
      • Set TPMS_Real[1] = 0.00
      • Set TPMS_Unit[1] = (Triggering unit)
      • Set TPMS_Unit[2] = No unit
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS___CastType Equal to Instant
        • Then - Actions
          • Set TPMS_Point[2] = (Position of TPMS_Unit[1])
          • Set TPMS_Point[1] = (TPMS_Point[2] offset by 1.00 towards ((Facing of TPMS_Unit[1]) + 180.00) degrees)
        • Else - Actions
          • Set TPMS_Point[1] = (Position of TPMS_Unit[1])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS___CastType Equal to Target
            • Then - Actions
              • Set TPMS_Point[2] = (Position of (Target unit of ability being cast))
            • Else - Actions
              • Set TPMS_Point[2] = (Target point of ability being cast)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TPMS_Point[1] and TPMS_Point[2]) Less than TPMS___Travel_Range_Max
              • (Distance between TPMS_Point[1] and TPMS_Point[2]) Greater than TPMS___Travel_Range_Min
            • Then - Actions
              • Set TPMS___Travel_Range_Max = (Distance between TPMS_Point[1] and TPMS_Point[2])
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between TPMS_Point[1] and TPMS_Point[2]) Less than TPMS___Travel_Range_Min
                • Then - Actions
                  • Set TPMS___Travel_Range_Max = TPMS___Travel_Range_Min
                • Else - Actions
      • -------- --- --------
      • Trigger - Run TPMS Missiles Create <gen> (checking conditions)
      • -------- --- --------
      • Custom script: call RemoveLocation(udg_TPMS_Point[1])
      • Custom script: call RemoveLocation(udg_TPMS_Point[2])
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Remaining time for TPMS____Timer) Equal to 0.00
        • Then - Actions
          • Countdown Timer - Start TPMS____Timer as a One-shot timer that will expire in TPMS____Timer_Speed seconds
        • Else - Actions
  • TPMS Missiles Create
    • Events
    • Conditions
    • Actions
      • Set TPMS____Index = (TPMS____Index + 1)
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS_Boolean[1] Equal to False
        • Then - Actions
          • Set TPMS_Boolean[1] = True
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS_Real[1] Greater than or equal to 180.00
            • Then - Actions
              • Set TPMS_Real[1] = (TPMS_Real[1] - 180.00)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS_Boolean[2] Equal to True
            • Then - Actions
              • Set TPMS_Point[3] = (TPMS_Point[2] offset by TPMS___LaunchOffset towards ((Angle from TPMS_Point[1] to TPMS_Point[2]) + TPMS_Real[1]) degrees)
            • Else - Actions
              • Set TPMS_Point[3] = (TPMS_Point[1] offset by TPMS___LaunchOffset towards ((Angle from TPMS_Point[1] to TPMS_Point[2]) + TPMS_Real[1]) degrees)
        • Else - Actions
          • Set TPMS_Boolean[1] = False
          • Set TPMS_Real[1] = (TPMS_Real[1] + TPMS___ExtraMissiles_Angle)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS_Boolean[2] Equal to True
            • Then - Actions
              • Set TPMS_Point[3] = (TPMS_Point[2] offset by TPMS___LaunchOffset towards ((Angle from TPMS_Point[1] to TPMS_Point[2]) - TPMS_Real[1]) degrees)
            • Else - Actions
              • Set TPMS_Point[3] = (TPMS_Point[1] offset by TPMS___LaunchOffset towards ((Angle from TPMS_Point[1] to TPMS_Point[2]) - TPMS_Real[1]) degrees)
      • Special Effect - Create a special effect at TPMS_Point[3] using TPMS___MissileModel_Path
      • Set TPMS__SpecialEffect[TPMS____Index] = (Last created special effect)
      • Special Effect - Set Scale of TPMS__SpecialEffect[TPMS____Index] to TPMS___MissileModel_Size
      • Trigger - Run TPMS Missiles Stats <gen> (checking conditions)
      • Custom script: call RemoveLocation(udg_TPMS_Point[3])
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS_Integer[1] Less than TPMS___ExtraMissiles
        • Then - Actions
          • Set TPMS_Integer[1] = (TPMS_Integer[1] + 1)
          • Trigger - Run (This trigger) (checking conditions)
        • Else - Actions
  • TPMS Missiles Stats
    • Events
    • Conditions
    • Actions
      • Set TPMS__Caster[TPMS____Index] = TPMS_Unit[1]
      • Set TPMS__Player[TPMS____Index] = (Owner of TPMS__Caster[TPMS____Index])
      • Set TPMS__LastTarget_Old[TPMS____Index] = TPMS_Unit[2]
      • -------- --- --------
      • Set TPMS__X[TPMS____Index] = (X of TPMS_Point[3])
      • Set TPMS__Y[TPMS____Index] = (Y of TPMS_Point[3])
      • -------- --- --------
      • Set TPMS__CollisionRadius[TPMS____Index] = TPMS___CollisionRadius
      • Set TPMS__LaunchOffset[TPMS____Index] = TPMS___LaunchOffset
      • -------- --- --------
      • Set TPMS__MissileModel_Path[TPMS____Index] = TPMS___MissileModel_Path
      • Set TPMS__MissileModel_Size[TPMS____Index] = TPMS___MissileModel_Size
      • -------- --- --------
      • Set TPMS__Damage_Min[TPMS____Index] = TPMS___Damage_Min
      • Set TPMS__Damage_Max[TPMS____Index] = TPMS___Damage_Max
      • Set TPMS__Damage_SpecialEffect[TPMS____Index] = TPMS___Damage_SpecialEffect
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS_Boolean[2] Equal to True
        • Then - Actions
          • Set TPMS__SpecialEffect_Facing[TPMS____Index] = (Angle from TPMS_Point[2] to TPMS_Point[3])
        • Else - Actions
          • Set TPMS__SpecialEffect_Facing[TPMS____Index] = (Angle from TPMS_Point[1] to TPMS_Point[3])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS__SpecialEffect_Facing[TPMS____Index] Greater than 360.00
        • Then - Actions
          • Set TPMS__SpecialEffect_Facing[TPMS____Index] = (TPMS__SpecialEffect_Facing[TPMS____Index] - 360.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS__SpecialEffect_Facing[TPMS____Index] Less than 0.00
            • Then - Actions
              • Set TPMS__SpecialEffect_Facing[TPMS____Index] = (TPMS__SpecialEffect_Facing[TPMS____Index] + 360.00)
            • Else - Actions
      • -------- --- --------
      • Set TPMS__Travel_Range_Min[TPMS____Index] = TPMS___Travel_Range_Max
      • Set TPMS__Travel_Range_Max[TPMS____Index] = TPMS___Travel_Range_Max
      • -------- --- --------
      • Set TPMS__Travel_Speed[TPMS____Index] = TPMS___Travel_Speed
      • Set TPMS__Travel_Speed_Accelerate[TPMS____Index] = TPMS___Travel_Speed_Accelerate
      • -------- --- --------
      • Set TPMS__AoE_SpecialEffect[TPMS____Index] = TPMS___AoE_SpecialEffect
      • Set TPMS__AoE_Radius[TPMS____Index] = TPMS___AoE_Radius
      • Set TPMS__AoE_DamageRatio[TPMS____Index] = TPMS___AoE_DamageRatio
      • Set TPMS__AoE_AtMaxRange[TPMS____Index] = TPMS___AoE_AtMaxRange
      • -------- --- --------
      • Set TPMS__Pierce_MaxTimes[TPMS____Index] = TPMS___Pierce_MaxTimes
      • Set TPMS__Pierce_Chance[TPMS____Index] = TPMS___Pierce_Chance
      • Set TPMS__Pierce_DamageRatio[TPMS____Index] = TPMS___Pierce_DamageRatio
      • Set TPMS__Pierce_HasEffects[TPMS____Index] = TPMS___Pierce_HasEffects
      • Set TPMS__Pierce_LoseEffects[TPMS____Index] = TPMS___Pierce_LoseEffects
      • Set TPMS__Pierce_Bounces[TPMS____Index] = TPMS___Pierce_Bounces
      • -------- --- --------
      • Set TPMS__Split_Amount[TPMS____Index] = TPMS___Split_Amount
      • Set TPMS__Split_Chance[TPMS____Index] = TPMS___Split_Chance
      • Set TPMS__Split_Angle[TPMS____Index] = TPMS___Split_Angle
      • Set TPMS__Split_OverallRatio[TPMS____Index] = TPMS___Split_OverallRatio
      • Set TPMS__Split_HasEffects[TPMS____Index] = TPMS___Split_HasEffects
      • Set TPMS__Split_AtMaxRange[TPMS____Index] = TPMS___Split_AtMaxRange
SYSTEM TO MAKE MISSILES WORK:
  • TPMS System Tic
    • Events
      • Time - TPMS____Timer expires
    • Conditions
    • Actions
      • For each (Integer TPMS____Index_Loop) from 1 to TPMS____Index, do (Actions)
        • Loop - Actions
          • Set TPMS__Travel_Speed[TPMS____Index_Loop] = (TPMS__Travel_Speed[TPMS____Index_Loop] + TPMS__Travel_Speed_Accelerate[TPMS____Index_Loop])
          • Set TPMS__Travel_Range_Max[TPMS____Index_Loop] = (TPMS__Travel_Range_Max[TPMS____Index_Loop] - TPMS__Travel_Speed[TPMS____Index_Loop])
          • Set TPMS_Point[1] = (Point(TPMS__X[TPMS____Index_Loop], TPMS__Y[TPMS____Index_Loop]))
          • Set TPMS_Point[2] = (TPMS_Point[1] offset by TPMS__Travel_Speed[TPMS____Index_Loop] towards TPMS__SpecialEffect_Facing[TPMS____Index_Loop] degrees)
          • Set TPMS__X[TPMS____Index_Loop] = (X of TPMS_Point[2])
          • Set TPMS__Y[TPMS____Index_Loop] = (Y of TPMS_Point[2])
          • Trigger - Run TPMS System Check <gen> (checking conditions)
          • Custom script: call RemoveLocation(udg_TPMS_Point[1])
          • Custom script: call RemoveLocation(udg_TPMS_Point[2])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS__SpecialEffect_Facing[TPMS____Index_Loop] Greater than 360.00
            • Then - Actions
              • Set TPMS__SpecialEffect_Facing[TPMS____Index_Loop] = (TPMS__SpecialEffect_Facing[TPMS____Index_Loop] - 360.00)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS____Index Equal to 0
        • Then - Actions
        • Else - Actions
          • Countdown Timer - Start TPMS____Timer as a One-shot timer that will expire in TPMS____Timer_Speed seconds
  • TPMS System Check
    • Events
    • Conditions
    • Actions
      • Special Effect - Set Roll of TPMS__SpecialEffect[TPMS____Index_Loop] to: ((TPMS__SpecialEffect_Facing[TPMS____Index_Loop] x 3.14) / 180.00)
      • Special Effect - Set Position of TPMS__SpecialEffect[TPMS____Index_Loop] to x: TPMS__X[TPMS____Index_Loop], y: TPMS__Y[TPMS____Index_Loop], z: 60.00
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS__Travel_Range_Max[TPMS____Index_Loop] Less than or equal to 0.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS__Split_AtMaxRange[TPMS____Index_Loop] Equal to True
              • TPMS__Split_Amount[TPMS____Index_Loop] Greater than 0
              • (Random percentage) Less than or equal to TPMS__Split_Chance[TPMS____Index_Loop]
            • Then - Actions
              • Trigger - Run TPMS System Split <gen> (checking conditions)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS__AoE_AtMaxRange[TPMS____Index_Loop] Equal to True
            • Then - Actions
              • Set TPMS__LastTarget_New[TPMS____Index_Loop] = No unit
              • Trigger - Run TPMS System AoE <gen> (checking conditions)
            • Else - Actions
          • Trigger - Run TPMS System Destroy <gen> (checking conditions)
          • Skip remaining actions
        • Else - Actions
      • -------- --- --------
      • Set TPMS__LastTarget_New[TPMS____Index_Loop] = No unit
      • Set TPMS_Group[1] = (Units within (TPMS__Travel_Speed[TPMS____Index_Loop] + TPMS__CollisionRadius[TPMS____Index_Loop]) of TPMS_Point[2])
      • Unit Group - Pick every unit in TPMS_Group[1] and do (Actions)
        • Loop - Actions
          • Set TPMS_Unit[1] = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TPMS_Unit[1] is alive) Equal to True
              • TPMS_Unit[1] Not equal to TPMS__LastTarget_Old[TPMS____Index_Loop]
              • TPMS_Unit[1] Not equal to TPMS__Caster[TPMS____Index_Loop]
              • (TPMS_Unit[1] belongs to an enemy of TPMS__Player[TPMS____Index_Loop]) Equal to True
            • Then - Actions
              • Set TPMS__LastTarget_New[TPMS____Index_Loop] = (Picked unit)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_TPMS_Group[1])
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS__LastTarget_New[TPMS____Index_Loop] Equal to No unit
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Set TPMS__LastTarget_Old[TPMS____Index_Loop] = TPMS__LastTarget_New[TPMS____Index_Loop]
          • Set TPMS_Unit[1] = TPMS__LastTarget_New[TPMS____Index_Loop]
          • Set TPMS_Real[1] = (Random real number between TPMS__Damage_Min[TPMS____Index_Loop] and TPMS__Damage_Max[TPMS____Index_Loop])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS_Real[1] Equal to 0.00
            • Then - Actions
              • Game - Display to (All players) the text: (String(TPMS__Damage_Min[TPMS____Index_Loop]))
              • Game - Display to (All players) the text: (String(TPMS__Damage_Max[TPMS____Index_Loop]))
            • Else - Actions
          • Trigger - Run TPMS System Damage <gen> (checking conditions)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TPMS__Pierce_MaxTimes[TPMS____Index_Loop] Greater than 0
              • (Random percentage) Less than or equal to TPMS__Pierce_Chance[TPMS____Index_Loop]
            • Then - Actions
              • Set TPMS__Pierce_MaxTimes[TPMS____Index_Loop] = (TPMS__Pierce_MaxTimes[TPMS____Index_Loop] - 1)
              • Set TPMS__Damage_Max[TPMS____Index_Loop] = (TPMS__Damage_Max[TPMS____Index_Loop] x TPMS__Pierce_DamageRatio[TPMS____Index_Loop])
              • Set TPMS__Damage_Min[TPMS____Index_Loop] = (TPMS__Damage_Min[TPMS____Index_Loop] x TPMS__Pierce_DamageRatio[TPMS____Index_Loop])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TPMS__Pierce_HasEffects[TPMS____Index_Loop] Equal to True
                • Then - Actions
                  • Trigger - Run TPMS System Split <gen> (checking conditions)
                  • Trigger - Run TPMS System AoE <gen> (checking conditions)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TPMS__Pierce_LoseEffects[TPMS____Index_Loop] Equal to True
                    • Then - Actions
                      • Trigger - Run TPMS System Remove Effects <gen> (checking conditions)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TPMS__Pierce_Bounces[TPMS____Index_Loop] Equal to True
                    • Then - Actions
                      • Set TPMS__SpecialEffect_Facing[TPMS____Index_Loop] = (Random angle)
                    • Else - Actions
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TPMS__Split_Amount[TPMS____Index_Loop] Greater than 0
                  • (Random percentage) Less than or equal to TPMS__Split_Chance[TPMS____Index_Loop]
                • Then - Actions
                  • Set TPMS__Split_Amount[TPMS____Index_Loop] = (TPMS__Split_Amount[TPMS____Index_Loop] - 1)
                  • Set TPMS___Damage_Max = (TPMS__Damage_Max[TPMS____Index_Loop] x TPMS__Split_OverallRatio[TPMS____Index_Loop])
                  • Set TPMS___Damage_Min = (TPMS__Damage_Min[TPMS____Index_Loop] x TPMS__Split_OverallRatio[TPMS____Index_Loop])
                  • Trigger - Run TPMS System Split <gen> (checking conditions)
                • Else - Actions
              • Trigger - Run TPMS System AoE <gen> (checking conditions)
              • Trigger - Run TPMS System Destroy <gen> (checking conditions)
      • -------- --- --------
  • TPMS System Split
    • Events
    • Conditions
    • Actions
      • Set TPMS___MissileModel_Path = TPMS__MissileModel_Path[TPMS____Index_Loop]
      • Set TPMS___MissileModel_Size = TPMS__MissileModel_Size[TPMS____Index_Loop]
      • Set TPMS___MissileModel_Size = (TPMS__MissileModel_Size[TPMS____Index_Loop] x TPMS__Split_OverallRatio[TPMS____Index_Loop])
      • -------- --- --------
      • Set TPMS___LaunchOffset = TPMS__LaunchOffset[TPMS____Index_Loop]
      • Set TPMS___CollisionRadius = (TPMS__CollisionRadius[TPMS____Index_Loop] x TPMS__Split_OverallRatio[TPMS____Index_Loop])
      • -------- --- --------
      • Set TPMS___Damage_SpecialEffect = TPMS__Damage_SpecialEffect[TPMS____Index_Loop]
      • -------- --- --------
      • Set TPMS___ExtraMissiles = (TPMS__Split_Amount[TPMS____Index_Loop] - 1)
      • Set TPMS___ExtraMissiles_Angle = TPMS__Split_Angle[TPMS____Index_Loop]
      • -------- --- --------
      • Set TPMS___Travel_Range_Max = TPMS__Travel_Range_Min[TPMS____Index_Loop]
      • Set TPMS___Travel_Range_Min = 0.00
      • -------- --- --------
      • Set TPMS___Travel_Speed = TPMS__Travel_Speed[TPMS____Index_Loop]
      • Set TPMS___Travel_Speed_Accelerate = TPMS__Travel_Speed_Accelerate[TPMS____Index_Loop]
      • -------- --- --------
      • Set TPMS___AoE_SpecialEffect = TPMS__AoE_SpecialEffect[TPMS____Index_Loop]
      • Set TPMS___AoE_Radius = (TPMS__AoE_Radius[TPMS____Index_Loop] x TPMS__Split_OverallRatio[TPMS____Index_Loop])
      • Set TPMS___AoE_Radius = TPMS__AoE_Radius[TPMS____Index_Loop]
      • Set TPMS___AoE_DamageRatio = TPMS__AoE_DamageRatio[TPMS____Index_Loop]
      • Set TPMS___AoE_AtMaxRange = TPMS__AoE_AtMaxRange[TPMS____Index_Loop]
      • -------- --- --------
      • Set TPMS___Pierce_MaxTimes = TPMS__Pierce_MaxTimes[TPMS____Index_Loop]
      • Set TPMS___Pierce_Chance = TPMS__Pierce_Chance[TPMS____Index_Loop]
      • Set TPMS___Pierce_DamageRatio = TPMS__Pierce_DamageRatio[TPMS____Index_Loop]
      • Set TPMS___Pierce_HasEffects = TPMS__Pierce_HasEffects[TPMS____Index_Loop]
      • Set TPMS___Pierce_LoseEffects = TPMS__Pierce_LoseEffects[TPMS____Index_Loop]
      • Set TPMS___Pierce_Bounces = TPMS__Pierce_Bounces[TPMS____Index_Loop]
      • -------- --- --------
      • Set TPMS___Split_Chance = 0.00
      • Set TPMS___Split_Amount = 0
      • Set TPMS___Split_Angle = 0.00
      • Set TPMS___Split_OverallRatio = 0.00
      • Set TPMS___Split_HasEffects = False
      • Set TPMS___Split_AtMaxRange = False
      • -------- --- --------
      • Set TPMS_Boolean[1] = True
      • Set TPMS_Boolean[2] = True
      • Set TPMS_Integer[1] = 0
      • Set TPMS_Real[1] = 0.00
      • Set TPMS_Unit[1] = TPMS__Caster[TPMS____Index_Loop]
      • Set TPMS_Unit[2] = TPMS__LastTarget_Old[TPMS____Index_Loop]
      • -------- --- --------
      • Trigger - Run TPMS Missiles Create <gen> (checking conditions)
  • TPMS System AoE
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TPMS__AoE_Radius[TPMS____Index_Loop] Greater than 0.00
        • Then - Actions
          • Special Effect - Create a special effect at TPMS_Point[2] using TPMS__AoE_SpecialEffect[TPMS____Index_Loop]
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) the text: TPMS__AoE_SpecialEffect[TPMS____Index_Loop]
          • Set TPMS_Group[1] = (Units within TPMS__AoE_Radius[TPMS____Index_Loop] of TPMS_Point[2])
          • Unit Group - Pick every unit in TPMS_Group[1] and do (Actions)
            • Loop - Actions
              • Set TPMS_Unit[1] = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TPMS_Unit[1] is alive) Equal to True
                  • TPMS_Unit[1] Not equal to TPMS__Caster[TPMS____Index_Loop]
                  • TPMS_Unit[1] Not equal to TPMS__LastTarget_New[TPMS____Index_Loop]
                  • (TPMS_Unit[1] belongs to an enemy of TPMS__Player[TPMS____Index_Loop]) Equal to True
                • Then - Actions
                  • Set TPMS_Real[1] = ((Random real number between TPMS__Damage_Min[TPMS____Index_Loop] and TPMS__Damage_Max[TPMS____Index_Loop]) x TPMS__AoE_DamageRatio[TPMS____Index_Loop])
                  • Trigger - Run TPMS System Damage <gen> (checking conditions)
                • Else - Actions
          • Custom script: call DestroyGroup(udg_TPMS_Group[1])
        • Else - Actions
  • TPMS System Damage
    • Events
    • Conditions
    • Actions
      • Special Effect - Create a special effect attached to the origin of TPMS_Unit[1] using TPMS__Damage_SpecialEffect[TPMS____Index_Loop]
      • Special Effect - Destroy (Last created special effect)
      • Unit - Cause TPMS__Caster[TPMS____Index_Loop] to damage TPMS_Unit[1], dealing (Real((Integer(TPMS_Real[1])))) damage of attack type Spells and damage type Normal
      • Floating Text - Create floating text that reads (String((Integer(TPMS_Real[1])))) above TPMS_Unit[1] with Z offset 0.00, using font size 9.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Hide (Last created floating text) for (All players)
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards (Random real number between 80.00 and 100.00) degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 0.75 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
      • Set TPMS_Force = (Player group(TPMS__Player[TPMS____Index_Loop]))
      • Floating Text - Show (Last created floating text) for TPMS_Force
      • Custom script: call DestroyForce(udg_TPMS_Force)
  • TPMS System Remove Effects
    • Events
    • Conditions
    • Actions
      • Set TPMS__Travel_Speed_Accelerate[TPMS____Index_Loop] = 0.00
      • -------- --- --------
      • Set TPMS__AoE_SpecialEffect[TPMS____Index_Loop] = <Empty String>
      • Set TPMS__AoE_Radius[TPMS____Index_Loop] = 0.00
      • Set TPMS__AoE_DamageRatio[TPMS____Index_Loop] = 0.00
      • Set TPMS__AoE_AtMaxRange[TPMS____Index_Loop] = False
      • -------- --- --------
  • TPMS System Destroy
    • Events
    • Conditions
    • Actions
      • Special Effect - Destroy TPMS__SpecialEffect[TPMS____Index_Loop]
      • -------- --- --------
      • Set TPMS__Caster[TPMS____Index_Loop] = TPMS__Caster[TPMS____Index]
      • Set TPMS__Player[TPMS____Index_Loop] = TPMS__Player[TPMS____Index]
      • Set TPMS__LastTarget_New[TPMS____Index_Loop] = TPMS__LastTarget_New[TPMS____Index]
      • Set TPMS__LastTarget_Old[TPMS____Index_Loop] = TPMS__LastTarget_Old[TPMS____Index]
      • -------- --- --------
      • Set TPMS__X[TPMS____Index_Loop] = TPMS__X[TPMS____Index]
      • Set TPMS__Y[TPMS____Index_Loop] = TPMS__Y[TPMS____Index]
      • -------- --- --------
      • Set TPMS__LaunchOffset[TPMS____Index_Loop] = TPMS__LaunchOffset[TPMS____Index]
      • Set TPMS__CollisionRadius[TPMS____Index_Loop] = TPMS__CollisionRadius[TPMS____Index]
      • -------- --- --------
      • Set TPMS__Damage_Max[TPMS____Index_Loop] = TPMS__Damage_Max[TPMS____Index]
      • Set TPMS__Damage_Min[TPMS____Index_Loop] = TPMS__Damage_Min[TPMS____Index]
      • Set TPMS__Damage_SpecialEffect[TPMS____Index_Loop] = TPMS__Damage_SpecialEffect[TPMS____Index]
      • -------- --- --------
      • Set TPMS__LastTarget_New[TPMS____Index_Loop] = TPMS__LastTarget_New[TPMS____Index]
      • -------- --- --------
      • Set TPMS__MissileModel_Path[TPMS____Index_Loop] = TPMS__MissileModel_Path[TPMS____Index]
      • Set TPMS__MissileModel_Size[TPMS____Index_Loop] = TPMS__MissileModel_Size[TPMS____Index]
      • -------- --- --------
      • Set TPMS__SpecialEffect[TPMS____Index_Loop] = TPMS__SpecialEffect[TPMS____Index]
      • Set TPMS__SpecialEffect_Facing[TPMS____Index_Loop] = TPMS__SpecialEffect_Facing[TPMS____Index]
      • -------- --- --------
      • Set TPMS__Travel_Range_Max[TPMS____Index_Loop] = TPMS__Travel_Range_Max[TPMS____Index]
      • Set TPMS__Travel_Range_Min[TPMS____Index_Loop] = TPMS__Travel_Range_Min[TPMS____Index]
      • -------- --- --------
      • Set TPMS__Travel_Speed[TPMS____Index_Loop] = TPMS__Travel_Speed[TPMS____Index]
      • Set TPMS__Travel_Speed_Accelerate[TPMS____Index_Loop] = TPMS__Travel_Speed_Accelerate[TPMS____Index]
      • -------- --- --------
      • Set TPMS__AoE_SpecialEffect[TPMS____Index_Loop] = TPMS__AoE_SpecialEffect[TPMS____Index]
      • Set TPMS__AoE_Radius[TPMS____Index_Loop] = TPMS__AoE_Radius[TPMS____Index]
      • Set TPMS__AoE_DamageRatio[TPMS____Index_Loop] = TPMS__AoE_DamageRatio[TPMS____Index]
      • Set TPMS__AoE_AtMaxRange[TPMS____Index_Loop] = TPMS__AoE_AtMaxRange[TPMS____Index]
      • -------- --- --------
      • Set TPMS__Pierce_MaxTimes[TPMS____Index_Loop] = TPMS__Pierce_MaxTimes[TPMS____Index]
      • Set TPMS__Pierce_Chance[TPMS____Index_Loop] = TPMS__Pierce_Chance[TPMS____Index]
      • Set TPMS__Pierce_DamageRatio[TPMS____Index_Loop] = TPMS__Pierce_DamageRatio[TPMS____Index]
      • Set TPMS__Pierce_HasEffects[TPMS____Index_Loop] = TPMS__Pierce_HasEffects[TPMS____Index]
      • Set TPMS__Pierce_LoseEffects[TPMS____Index_Loop] = TPMS__Pierce_LoseEffects[TPMS____Index]
      • Set TPMS__Pierce_Bounces[TPMS____Index_Loop] = TPMS__Pierce_Bounces[TPMS____Index]
      • -------- --- --------
      • Set TPMS__Split_Amount[TPMS____Index_Loop] = TPMS__Split_Amount[TPMS____Index]
      • Set TPMS__Split_Chance[TPMS____Index_Loop] = TPMS__Split_Chance[TPMS____Index]
      • Set TPMS__Split_Angle[TPMS____Index_Loop] = TPMS__Split_Angle[TPMS____Index]
      • Set TPMS__Split_OverallRatio[TPMS____Index_Loop] = TPMS__Split_OverallRatio[TPMS____Index]
      • Set TPMS__Split_HasEffects[TPMS____Index_Loop] = TPMS__Split_HasEffects[TPMS____Index]
      • Set TPMS__Split_AtMaxRange[TPMS____Index_Loop] = TPMS__Split_AtMaxRange[TPMS____Index]
      • -------- --- --------
      • -------- --- --------
      • Set TPMS____Index = (TPMS____Index - 1)
      • Set TPMS____Index_Loop = (TPMS____Index_Loop - 1)
 
Last edited by a moderator:
Level 3
Joined
Nov 24, 2011
Messages
31
I see that you are using the new functions for special effects. Nice!

The core of your system would be better off just handling the movement and collision of missiles.
Features, such as damage, extra missiles, AoE effects, piercing and max range, could then be extensions of this core through custom events that you will provide.
Otherwise, such features are just extra bulk that hog the performance of the system.

Some custom events that you could provide are OnHitUnit, OnHitDestructable, OnHitMissile, OnLaunch, OnPeriodic, OnTerrain, etc. Custom events will allow users to manipulate the missile however they want. For an example of such custom events, take a look at BPower's Missile [GUI].
 
Last edited:
Level 11
Joined
Feb 23, 2009
Messages
577
I see that you are using the new functions for special effects. Nice!

The core of your system would be better off just handling the movement and collision of missiles.
Features, such as damage, extra missiles, AoE effects, piercing and max range, could then be extensions of this core through custom events that you will provide.
Otherwise, such features are just extra bulk that hog the performance of the system.

Some custom events that you could provide are OnHitUnit, OnHitDestructable, OnHitMissile, OnLaunch, OnPeriodic, OnTerrain, etc. Custom events will allow users to manipulate the missile however they want. For an example of such custom events, take a look at BPower's Missile [GUI].

Very good ideas, I will make a bare bones version as well as extensions, however I think that the additional missiles should be part of the basic version as it's an extremely simple trigger and I don't think it lags at all or takes much space (it runs the same trigger whether it is for a single or multiple missiles).

About the Min/Max Range stats, they are weird stats but I think they are crucial even for basic Point Casts.
Min Range: Target point for ability is under min range, set to min range (<100 but 300 min range = 300 exact range)
Max Range: Target point for ability is over max range, set to max range
If your point cast is higher than min range but lower than max range then it will end exactly where you cast.

What I will make as extensions:
- AoE
- Piercing
- Split
- Seeking
- Wander (Missile randomly turns, for "uncontrollable" effects like rockets or w/e)


Triggers I will add to allow people to further customize:
- On Hit (Missile / Destructible / Terrain)


Questions:
1) Isn't OnHitMissile that you suggested just a combined version or Unit/Destructible/Terrain?
2) OnPeriodic doesn't have any use that I can think of besides Seeking/Wander which I plan on implementing (if you have more ideas please let me know for that one).
3) OnLaunch serves the same purpose as on cast? Might as well just add it at the top or bottom of the spell trigger then?
4) About performance, I've made spells that launch hundreds of missiles at once, and spam cast it, and got little to zero lag myself, did you encounter any lag?

PS: I will make the bulk version and then turn whatever I can into extensions as the whole product is more important to me than making a "light" version (since the heavy version is extremely light anyways).
 
Last edited by a moderator:
Level 11
Joined
Jul 4, 2016
Messages
627
The system seems great so far, no lag was experienced. However, I was wondering if could this system be used also for replacing auto attacking missiles.

Also, are you planning on adding the ability for the user to modify things like start height and end height, as well as the ability to damage whatever target the user chooses regardless of alliance. And for flavor, homing missiles with arc supports?
 
Last edited:
Level 24
Joined
Feb 9, 2009
Messages
1,787
Interesting bug:

Using faerie fire as a base spell for unit targeting makes the missile not target the intended target (Instead whizzing off to center of map)


ETA: Something I made using your system as a starting point (Probably leaky but still interesting!)
 

Attachments

  • Arcane Barrage 2.0.w3x
    68.2 KB · Views: 31
Last edited:
Status
Not open for further replies.
Top