• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Requesting a shooting system

Status
Not open for further replies.
Level 11
Joined
Mar 18, 2009
Messages
788
I need a basic shooting system for my project, nothing big actually it should just be like a trigger version of the Shockwave/Carrion Swarm ability that I can easily modify the Projectile Speed, Projectile Height, Projectile Model, Damage and the number of units it can damage/pass through.

It should be MUI and GUI. Bonus points if you can make it so that the projectile doesn't go through Purple areas (Pathing Blockers in general).

I'll hand out some rep and give credits in my map. :)
 

Attachments

  • Test Map. Shooting System 1.w3x
    11.9 KB · Views: 56
Level 8
Joined
Apr 16, 2013
Messages
351
  • Shockwave Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • -------- Stores Caster into a variable --------
      • Set Caster = (Triggering unit)
      • -------- Finds the locations of Caster, target point and Wave spawn point --------
      • Set Points[1] = (Position of Caster)
      • Set Points[2] = (Target point of ability being cast)
      • Set Points[3] = (Points[1] offset by 70.00 towards (Angle from Points[1] to Points[2]) degrees)
      • -------- Distance which the wave will travel --------
      • -------- NOTE 1: Change your MAX wave distance here --------
      • Set Real[1] = 950.00
      • -------- Here put your 'stun' duration --------
      • -------- NOTE 3: If you put a higher amount, then the 'stun' will last longer --------
      • Set Real[2] = (2.00 + (Real((Level of Shockwave for Caster))))
      • -------- Counts the damage dealt by wave --------
      • -------- NOTE 3: Calculate your damage here --------
      • Set Real[3] = (20.00 + (70.00 x (Real((Level of Shockwave for Caster)))))
      • -------- Creates a wave unit --------
      • -------- NOTE 4: Change your wave model in the Object editor, unit The Shockwave --------
      • Unit - Create 1 The Shockwave for (Owner of Caster) at Points[3] facing (Angle from Points[1] to Points[2]) degrees
      • -------- Stores the information required into hashtable --------
      • -------- NOTE 5: All infromation is attached to the wave unit --------
      • Hashtable - Save Handle OfCaster as 0 of (Key (Last created unit)) in Hashtable
      • Hashtable - Save Real[1] as 1 of (Key (Last created unit)) in Hashtable
      • Hashtable - Save Real[1] as 2 of (Key (Last created unit)) in Hashtable
      • Hashtable - Save Real[2] as 3 of (Key (Last created unit)) in Hashtable
      • Hashtable - Save Real[3] as 4 of (Key (Last created unit)) in Hashtable
      • -------- Checks if there is any instance of spell already running --------
      • -------- If not, then turns the sliding trigger on --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Shockwaves is empty) Equal to True
        • Then - Actions
          • Trigger - Turn on Shockwave Slide <gen>
        • Else - Actions
      • -------- Adds wave unit to the Waves' group --------
      • Unit Group - Add (Last created unit) to Shockwaves
      • -------- Clears the Leaks --------
      • Custom script: call RemoveLocation(udg_Points[1])
      • Custom script: call RemoveLocation(udg_Points[2])
      • Custom script: call RemoveLocation(udg_Points[3])
  • Shockwave Slide
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Shockwaves and do (Actions)
        • Loop - Actions
          • -------- Loads the Caster --------
          • Set Caster = (Load 0 of (Key (Picked unit)) in Hashtable)
          • -------- Loads the Distance-to-Travel and reduces it by 'speed' --------
          • Set Real[1] = (Load 1 of (Key (Picked unit)) from Hashtable)
          • -------- NOTE 1: The real number substracted must be equal to the one below (I'll remind it to you) --------
          • Set Real[1] = (Real[1] - 27.00)
          • -------- Loads the total Distance-to-Travel and counts the % of the way left --------
          • -------- This will be used to shorten the duration of 'stun' --------
          • -------- NOTE 3: This doesn't allow you to have the max duration of 'stun', but the difference is not too noticable --------
          • Set Real[2] = (Load 2 of (Key (Picked unit)) from Hashtable)
          • Set Real[3] = (Real[1] / Real[2])
          • -------- Loads the total Duration of 'stun' --------
          • Set Real[4] = (Load 3 of (Key (Picked unit)) from Hashtable)
          • -------- Counts how long will 'stun' last on enemies enumerated during this loop --------
          • Set Real[4] = (Real[3] x Real[4])
          • -------- Loads the damage-to-deal --------
          • Set Real[5] = (Load 4 of (Key (Picked unit)) from Hashtable)
          • -------- Finds the location of wave unit and calculates the point to which will it will move --------
          • Set Points[1] = (Position of (Picked unit))
          • Set Points[2] = (Points[1] offset by 27.00 towards (Facing of (Picked unit)) degrees)
          • -------- Enumerates enemies for damaging and 'stunning' --------
          • -------- NOTE 4: Enumerates visible enemy ground units which are still alive and are not mechanical nor magic immune --------
          • Set Enemies = (Units within 200.00 of Points[2] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) has buff Stun ) Not equal to True)) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is Magic Immune) Not eq
          • -------- Moves the wave unit to the further it's location --------
          • Unit - Move (Picked unit) instantly to Points[2]
          • -------- Does the damaging and 'stunning' --------
          • Unit Group - Pick every unit in Enemies and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy Caster for (Owner of Caster) at Points[2] facing Default building facing degrees
              • Unit - Add Dummy Stun to (Last created unit)
              • Unit - Set level of Dummy Stun for (Last created unit) to (Level of Shockwave for Caster)
              • Unit - Order (Last created unit) to Human Dragonhawk Rider - Aerial Shackles (Picked unit)
              • Unit - Add a Real[4] second Generic expiration timer to (Last created unit)
              • Unit - Cause Caster to damage (Picked unit), dealing Real[5] damage of attack type Spells and damage type Normal
          • -------- Checks if the distance-to-travel left isn't over --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Real[1] Less than or equal to 0.00
            • Then - Actions
              • -------- If it is, then... --------
              • -------- Rids the hashtable of all information attached to the Wave unit --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
              • -------- Removes wave unit from Waves' group --------
              • Unit Group - Remove (Picked unit) from Shockwaves
              • -------- Kills the Wave unit --------
              • Unit - Kill (Picked unit)
              • -------- Removes Wave unit from game --------
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
              • -------- If it isn't, then... --------
              • -------- Updates the Distance-to-Travel left --------
              • Hashtable - Save Real[1] as 1 of (Key (Picked unit)) in Hashtable
          • -------- Clears the leaks --------
          • Custom script: call DestroyGroup(udg_Enemies)
          • Custom script: call RemoveLocation(udg_Points[1])
          • Custom script: call RemoveLocation(udg_Points[2])
      • -------- Checks if there is any Instance of spell still runing --------
      • -------- If there isn't any, then turns this trigger off --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Shockwaves is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Level 11
Joined
Mar 18, 2009
Messages
788
I will check that out soon.

It is not that everyone is not interested about this request , it is just I don't know why.
I guess it was a too simple request for this community but its gonna be a core element in my map which will be spammed frequently so I wanted it to be good and efficient.
 
Status
Not open for further replies.
Top