• 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] Build Radius Problem

Status
Not open for further replies.
Level 9
Joined
Apr 14, 2007
Messages
437
Okay, Im sure at least one person who reads this, has played my Command and Conquer Red Alert map before. It got around 17K downloads. Anyway, I am having a problem with making a build radius for when someone builds something.

If you've ever played the real CNC, it would help out a lot to help me too. You start out with an MCV (Mobile Construction Vehicle) which you can unpack into a Command Center anywhere. The problem is, my trigger deletes the units when it unpacks, therefore making it unplayable.

I want the trigger to force players to build within a 500 radius of any building, but DO NOT DELETE any MCV. Here's the GUI I have so far, and I've done many tests with it:


If you want the trigger from WE, download my attachment which has my map.
  • Build System
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Set temp_location = (Position of (Triggering unit))
      • Set temp_group = (Units within 500.00 of temp_location matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))) and (((Life of (Matching unit)) Not equal to 1550.00) and ((Life of (Matching unit)) Less
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Unit-type of (Matching unit)) Not equal to Mobile Construction Vehicle (Allied)
              • (Unit-type of (Matching unit)) Not equal to Mobile Construction Vehicle (Soviet)
              • (Unit-type of (Matching unit)) Not equal to Command Centre (Allied)
              • (Unit-type of (Matching unit)) Not equal to Command Centre (Soviet)
          • (Number of units in temp_group) Less than 1
        • Then - Actions
          • -------- Just remember to change the units point value in the object editor to the cost of the unit --------
          • Unit - Remove (Triggering unit) from the game
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You must build clos...
          • Player - Add (Integer((Real((Point-value of (Triggering unit)))))) to (Owner of (Triggering unit)) Current lumber
          • Unit - Remove (Triggering unit) from the game
        • Else - Actions
          • Do nothing
      • Custom script: call DestroyGroup(udg_temp_group)
      • Custom script: call RemoveLocation(udg_temp_location)
 

Attachments

  • HelpWTrigCNC.w3x
    1.9 MB · Views: 20
Level 9
Joined
Apr 14, 2007
Messages
437
Oh BTW!!! Im not going to be using workers anymore if I get a soultion to this trigger. I want all buildings to build from the command center once it has been unpacked. Can the command center build from far away once you get buildings out that far? Or does it has to use a spell to create buildings? Please help :p
 
Status
Not open for further replies.
Top