2 Questions:Countdown Timer and Player Remove!

brodygs9630

TH.net Regular
Reaction score
6
Im makning a survival map,and I need help with making a countdown timer.You have to survive for 1 minute,and I want it to show a clock counting down from 1 minute.

I also want to make it so that if the player slot is empty,his Hero gets removed from the game.

Helping=+rep:)
 

brodygs9630

TH.net Regular
Reaction score
6
Thz for answering the timer question,but I don't know what trigger to make to loop and see if players are playing =( +rep:thup:

Still need help with the unit removel!
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Well, something like this will get you started:

Trigger:
  • Remove Player
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Not equal to (!=) Is playing
            • Then - Actions
              • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
            • Else - Actions


Read up on leaks as well, because there are some in that trigger. ;)
 

WilliamPa

Active Member
Reaction score
51
According to my nubby-ish calculations there were just two:

Unit Group:
Code:
call RemoveGroup(namehere)

Player Group:
Code:
call RemoveForce(namehere)

Just posted if brodygs happens to need :)
 

Lamby

New Member
Reaction score
6
Here ya go:

Trigger:
  • Players
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Not equal to Is playing
            • Then - Actions
              • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
            • Else - Actions


Reduces it to one leak.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
It leaks 2 players.

Trigger:
  • ((Player((Integer A))) slot status) Not equal to Is playing


and

Trigger:
  • Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Actions)


Player (Integer A) returns a player, no variables set to it, it considered leak.
 

brodygs9630

TH.net Regular
Reaction score
6
Still can't figure out the Unit one...I would make it so that the start points create heros,so that I could just use the Hero Arena way of removing units,but I don't know how to remove units without using redo.=/
 

WilliamPa

Active Member
Reaction score
51
Create 'Unit Group' variable, set it to 'All Units owned by [playerhere]' and in end of trigger do 'Custom Script: call DestroyGroup(variable name here)
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top