• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

destructible picking problem

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
I have faced a problem in picking destructibles around units . Well , The idea is:
1- It's all about destroying bricks which are destructibles .
2- A Unit jumps and when it enters a region below the brick , it's destroyed .
But It seems that it picks on destructible :/.
JUMP's Z IS CONSTANT !
It's a simple small trigger

  • Region 1
    • Events
      • Unit - A unit enters D1 <gen>
      • Unit - A unit enters D2 <gen>
      • Unit - A unit enters D3 <gen>
    • Conditions
    • Actions
      • Set Brick_HEROPOINT = (Position of (Triggering unit))
      • Set Brick_POINT2 = (Brick_HEROPOINT offset by 32.00 towards 90.00 degrees)
      • Destructible - Pick every destructible within 64.00 of Brick_TempPoint and do (Actions)
        • Loop - Actions
          • Set Brick_Point3 = (Position of (Picked destructible))
          • Destructible - Remove (Picked destructible)
          • Special Effect - Create a special effect at Brick_Point3 using Objects\Spawnmodels\Orc\OrcLargeDeathExplode\OrcLargeDeathExplode.mdl
          • Special Effect - Destroy (Last created special effect)
          • Sound - Play block_smash <gen> at 100.00% volume, located at Brick_POINT2 with Z offset 0.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked destructible) is alive) Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: Brick Not removed
            • Else - Actions
              • Game - Display to (All players) the text: Brick REMOVED
      • Set Brick_ITEM_Group = (Units within 64.00 of Brick_POINT2)
      • Unit Group - Pick every unit in Brick_ITEM_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Item Block Coin New
            • Then - Actions
              • Unit - Replace (Picked unit) with a Item Block Coin Hit using The new unit's max life and mana
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Item Block Coin Hit
                • Then - Actions
                  • Sound - Play block_hit <gen> at 100.00% volume, located at Brick_POINT2 with Z offset 0.00
                • Else - Actions
      • Set Jumpers_Y_Velocity[(Player number of (Owner of (Triggering unit)))] = 29.43
      • Custom script: call RemoveLocation(udg_Brick_HEROPOINT)
      • Custom script: call RemoveLocation(udg_Brick_POINT2)
      • Custom script: call RemoveLocation(udg_Brick_Point3)
 
Status
Not open for further replies.
Top