HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

leave and share control

08-18-2003, 11:24 PM#1
SinHarvest
This sounds kinda basic, but I can't seem to get it working right. I want to create a trigger which whenever a player leaves the game a message is sent to all players saying "player name" has left the game. Additionally I want to share control of the players units with the other 5 on his team. Help? Thx
08-18-2003, 11:58 PM#2
SinHarvest
Events
Time- Every 2 seconds of game time
Conditions
(player 1 (Red) Slot status) equal to Has left the game
Actions
Game- Display to all players the text: Somone has left our world.
Player Group- Make Player Group- Player 2 treat player 1 as an ally with shared vision and full shared units.
Player Group " "- Player 3 " "
etc...
Trigger- Turn off this trigger

I set this up for all the players to run the player group on their allies, but last time i tried this someone left the game and all players were allied and given control of each other. Including enemy team. >_<
08-19-2003, 06:38 AM#3
GuidingSpirit
I do not have the editor by hand so I cannot test it but try this:

First:

All Allies should be in a team so they are allied from the beginning.

So for example Team A (Players 1 to 5):

Event - Every X Seconds

Condition - Player 1 Slotstatus equal to has left the game

Action - Pick every Player in Playergroup Team A and do:
Set Aspect of Alliance between Picked Player and
Player 1 to shared controll

I cannot tell you the exact term for the Player-Set Aspect of Alliance so you have to try this.

In TFT there are two different shared controll aspects. A normal one and an advanced one.
If you want to use the advanced one you have to set the normal one first.

Hope this helps
08-19-2003, 08:36 AM#4
Alex_The_One
here i copied this direct from editor

Events
Time - Every 2.00 seconds of game time

Conditions
(Player 1 (Red) slot status) Equal to Has left the game

Actions
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + Has left The Game)

Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
Loop - Actions
Player - Make (Picked player) treat Player 1 (Red) as an Ally with shared vision and full shared units



hope ya have tft otherwise it dos'nt work exactly like this
08-19-2003, 05:39 PM#5
Neo_Genesis
And yet another way to do it

Event
Time - Every 2.00 second if game time
Conditions
Actions
For each (intiger A) from 1 to 12, do (actions)
Loop - Actions
if (all conditions are true) then do (then actions) else do (else actions)
if - conditions
playerhasleft[(intiger A)] Equal True
((Player((integer A))) slot status) Equal to Has left the game
Then - actions
Set playerhasleft[(intiger A)] = False
Unit Group - Pick every unit in (units owned by (player((Integer A)))) and do (actions)
Loop - Actions
Unit - Change ownership of (picked unit) to (Random player from (all players matching ((((Player((integer A)) is giving (matching player) Alliance (non - aggression)) Equal to True) and (((Matching player) slot status) Equal to is playing)))) and change color
Else - actions

That will go through every player in the game and randomly give a unit to their ally (if their ally is still playing) the playerhasleft[] is a varible to make sure that this runs only once, it should be an array as long as the number of players you have and should be set to defualt True.

To make this work for less players simply change the loop range from 1 to 12, to what ever you need. As long as the players have an alliance it will work.

Hope that helps you

Neo_Genesis
08-19-2003, 08:41 PM#6
SinHarvest
thx helps a lot