• 🏆 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!

Simple system

Status
Not open for further replies.
Level 4
Joined
Aug 5, 2011
Messages
94
Hi i want a system for my map.

i want a system to do the following .

When player 1 red selects more than one unit at the same time the game will be over and the map is end.

I want it for my map its a minigame and the player must select 1 unit only and i want this system to be an anti cheat system for my map.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Hi i want a system for my map.

i want a system to do the following .

When player 1 red selects more than one unit at the same time the game will be over and the map is end.

I want it for my map its a minigame and the player must select 1 unit only and i want this system to be an anti cheat system for my map.

That's a very poor game mechanic, as it's also possible to select multiple units by accident. You should simply limit the possibility to actually select multiple.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Defeat
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • Set TempGroup = (Units currently selected by Player 1 (Red))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Greater than 1
        • Then - Actions
          • Game - Display to (All players) the text: GAME OVER
          • Game - Defeat Player 1 (Red) with the message: Defeat!
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Level 4
Joined
Aug 5, 2011
Messages
94
But i need that system to select one unit only .

I need something like this

Player 1 red selects a unit

if units are >1(greater to 1)

show defeat
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Why don't you just detect if more than 1 unit is selected, display a message, and re-select one random unit of units currently selected by that player?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
What about warnings? If the player select multiple units, warn him once or twice before "punishing him" with game lost.
 
Status
Not open for further replies.
Top