Issue in tower defense

MissKerrigan

Active Member
Reaction score
23
Hey there,

Got 2 question about my tower defense when a player leaves the game:

1. if a player leaves the game, his resoursec must not shared with the remaining players

how do I program this?


2. when a player left the game, his towers should disappear, the creeps of his area should disappear and the wave triggers of that player must stop

Need some help with this

MissKerrigan
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
1. There is no easy way to just make it not share the money, at least not that I've found. You could just make sure they're not allies, but if that's not an option, you can always just go through all the players on that team, take together their resources and give (resources) / (active players + 1) to each player.

In the next patch(1.5), there will be an action to disable resource sharing between players.

2. (I'm writing this from memory, might not be 100% exact.
Event:
Any Player leaves the game
Conditions:
Local Variables:
Actions:
Pick every unit in (Units in (Entire Map) matching: Owned by (Triggering Player)):
Unit - Remove (Picked Unit)

I'm not sure how your wave triggers work, but you should be able to use the action "Turn off Trigger" to turn it off. You could also add a condition to all wave triggers that look something like "(Status of (player)) == Playing". "player" is the player for that specific wave trigger.
 

MissKerrigan

Active Member
Reaction score
23
your last option wont work, but that's hard to explain, you don't about how I programmed it so leave that

Is there any trigger which kills/removes units in region?
I could there for make 4 regions over every 'player area' and just trigger to remove the local appeared units at this point
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top