• 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.

[Trigger] Trigger not working in tandem with Locust. Would love some help.

Status
Not open for further replies.
Level 13
Joined
Oct 10, 2009
Messages
439
First of all. Eonfuzz is my online account

Second of all. The map I'm working on is being converted. And I have a slight problem. I wish for one of my buildings "Pulse Generator" To remove a unit from a unit group, but....
Said unit has locust and will not work.

Idea: Any bullets that enter withing X range of a pulse generator are sent into stasis. Unable to move. (Would be even better if it reflected the bullets)

I would be extremely greatful for any help regarding this.
Map:
http://www.hiveworkshop.com/forums/pastebin_data/aimc23/_files/Battle of the Marines(2).w3x
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
I took a look at the map and your trigger could look like this:

  • Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UG_PulseGen and do (Actions)
        • Loop - Actions
          • Set TempPoint1 = (Position of (Picked unit))
          • Unit Group - Pick every unit in PulseEffected and do (Actions)
            • Loop - Actions
              • Set TempPoint2 = (Position of (Picked unit))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between TempPoint1 and TempPoint2) Less than or equal to 300.00
                • Then - Actions
                  • Unit - Remove IsBullet from (Picked unit)
                  • Unit Group - Remove (Picked unit) from AttackGroup
                  • Unit Group - Remove (Picked unit) from PulseEffected
                  • Game - Display to (All players) the text: we432
                • Else - Actions
              • Custom script: call RemoveLocation(udg_TempPoint2)
          • Custom script: call RemoveLocation(udg_TempPoint1)
When you create units with locust, add them to PulseEffected. Never destroy the group.

You should also know that this leaks:
  • Set TargetPoint = ((Position of (Triggering unit)) offset by -60.00 towards (Facing of (Triggering unit)) degrees)
->
  • Set TargetPoint = ((Position of (Triggering unit))
  • Set TargetPoint2 = TargetPoint offset by -60.00 towards (Facing of (Triggering unit)) degrees)
 
Status
Not open for further replies.
Top