Porblem removing buildings with triggers

  • Thread starter Thread starter JoBByLoGGy
  • Start date Start date
J

JoBByLoGGy

Guest
I'm making a map which every buildings is already placed. Then i want to remove them with triggers if the buildings don't have a user or computer controlling it.
My triggers that doesnt work looks like this

Events: Time elapsed 2 sec
Conditions:
Actions: If (all conditions are true) then do (then actions) else do (else actions)

if conditions: (player 2 blue controller equal to none

then actions: unit group - remove all units (units owned by player 2 blue))

else actions: do nothing

why doesnt it work?
 
I would try with
Code:
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
    Loop - Actions
        Unit - Remove (Picked unit) from the game
 
Change the condition to "Player status of Player 2 not equal to playing". That works for me.
 
then actions: unit group - remove all units (units owned by player 2 blue))

well if he's not in the game then it wouldnt be controlled by him.. would it?
 
Do you mean when ppl leave/ get booted?
If so I got the solution. I have had to make tons of thouse.
 
If he does I got that one covered.
Ahh hell if it is that situation here is the trigger.

Red Gone
Events
Map initialization
Conditions
(Player 1 (Red) slot status) Equal to Is unused
Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Explode (Picked unit))


Now, I think I can think one up so it is all one trigger for all players that arnt in.
I will post it when I make it.
 
It is always better to use "not equal to playing", because we all know that every now and then there are those people who leave as the game starts, and it's more general so it can be reused if necessary.
 
But why would you not want a more general trigger? After all, you wouldn't want the units of a player who quit 1 second into the game to remain, would you?
 
I have a trigger for that. As A matter of a fact I am working on making a better trigger for it all.
 
I don't understand what you are saying, but it's ok, because the question is answered. :)
 
RED
Events
Time - Every 2.00 seconds of game time
Conditions
(Player 1 (Red) slot status) Equal to Has left the game
Actions
Trigger - Turn off (This trigger)
Player Group - Remove Player 1 (Red) from Defenders
Game - Display to (All players) for 25.00 seconds the text: ((Name of Player 1 (Red)) + has left the game|r)
Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Unit - Change ownership of (Picked unit) to (Random player from Defenders) and Change color)
Leaderboard - Change the label for Player 1 (Red) in (Last created leaderboard) to ditcher
 
Hmm, could you not use 'Player 1 has left the game' as the event? It seems, to me at least, that triggers that fire every 2 seconds the game tend to lag it a bit more then a trigger that will only work when specified.
 
Well, give that event a shot, and lemme know how that works...Curious, myself :D
 
First of all, that turns itself off, so it has no effect.

Doesn't having a trigger turn itself off not affect the current actions, but prevent it from ever running again afterward?
 
SilverHawk said:
Doesn't having a trigger turn itself off not affect the current actions, but prevent it from ever running again afterward?

Yes, Silverhawk, you're right. If you load the map WarChasers into your editor, you'll see it has quite a few Creep Spawning triggers, using Regions to set it off, and also to place the units. In each trigger, there is the action:
Turn off (This trigger)
This is so that everytime a Hero passes through the region, the trigger isn't setting it off again.

Example:
Hero enters Region1
Creeps spawn in Region2
Hero kills creeps
Hero goes to leave, again walking over Region1, as it covers the exit
Without the Turn off (This trigger) action, the creeps would be spawned AGAIN, thus making it almost impossible to retreat.

However, in a trigger like this one, Player 1 can only leave 1 time. So I doubt you need that action. Either way, it doesn't do much.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top