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

this unit selection is not working..

Status
Not open for further replies.
Level 2
Joined
Nov 16, 2007
Messages
10
  • Units
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Footies = (Units in Rect 000 <gen>)
  • Unit Select
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OnOff Equal to 0
          • ((Triggering unit) is in Footies) Equal to True
        • Then - Actions
          • Selection - Select Footies for Player 1 (Red)
          • Set OnOff = 1
        • Else - Actions
  • Unit Deselect
    • Events
      • Player - Player 1 (Red) Deselects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in Footies) Equal to True
        • Then - Actions
          • Set OnOff = 0
        • Else - Actions

it works but it select all the units on the map, and also when i use it after using it about 6-7 times or spamming it the game freezes like b4

also when i select a unit that is not in the unit group.. it selects the unit group
 
Last edited by a moderator:
Level 21
Joined
Aug 21, 2005
Messages
3,699
Put ((Triggering unit) is in Footies) Equal to True and "onoff" equal to 0 or 1 in the conditions of your triggers. Don't know if that helps (doubt it), but you don't need if/then/else conditions in these triggers...

How large is your region 000? Add a game message displaying the # of units in "Footies" whenever you select a unit in footies for debugging. If it's more than the units initially in region 000, something must be wrong with the map initialisation trigger...

Finally, use
  • and [[SIZE="1"].[/SIZE]/trigger] around your GUI triggers please...
 
Status
Not open for further replies.
Top