| 03-01-2005, 07:38 AM | #1 |
I have a trigger that I want to only work for the person hosting the game no matter what player they are. Is there a way to do this? What would the condition look like? |
| 03-01-2005, 09:40 AM | #2 | |
Quote:
If you know the name of the host player it would work this way: Code:
local integer Index = 0
loop
exitwhen Index >= 12
if GetPlayerName(GetLocalPlayer()) = "hostplayernamehere" then
//your actions here
endif
set Index = Index + 1
endloopThe actions can only be things like displaying text, playing sounds, changing the sky and such. Everything else would desync the game. |
| 03-01-2005, 07:51 PM | #3 |
I think that with "host" he is talking about the person that started the game |
| 03-01-2005, 08:06 PM | #4 | |
Quote:
i know, me too |
| 03-01-2005, 08:27 PM | #5 |
In fact most of the game consider that red is the host... It is easier. But that is true that the host may be another color and in this case... hum.... well..... I don't see.... ^_^ |
| 03-01-2005, 08:39 PM | #6 |
Player 1 is the host when the map doesn't have fixed start locations. |
| 03-01-2005, 08:52 PM | #7 | |
Quote:
Hum.... Yes... I have a question about this topic.. Maybe can help the thread creator too... ^_^ But when the first host leave... can we know who is the second host? |
| 03-02-2005, 05:41 AM | #8 |
The reason for this is that I have an options trigger to be used within the first 10 seconds of the game where you can vote on game lenght, random heroes, and so on. I want it so that the person that hosted the map is the only one to be able to start the voting. Most times the host will move and change colors so I was hoping there would be another way. |
| 03-05-2005, 10:51 PM | #9 | |
Quote:
Well.... I have fund a function : GetLocalPlayer() What is it? for host? |
| 03-07-2005, 03:55 PM | #10 |
That is the player looking at the screen, with it you make things that multiboards that only work for certain players and that stuff, it has nothing to work with the host. |
| 03-07-2005, 04:55 PM | #11 |
looking at the screen? Well I have to say I don't understand... This function doesn't take a location so it is not a part of the map we need to look... So what? |
| 03-07-2005, 09:30 PM | #12 |
It's asynchroneous. On player 1's computer it will return Player 1, on player 2's computer it will return Player 2 and so on... |
| 03-08-2005, 06:44 PM | #13 | |
Quote:
I didn't see the aim but anyway.... Asyncroneous is bad for multiplayer, no? |
| 03-08-2005, 06:59 PM | #14 | |
Quote:
In this case it's good. We place intentional asynchroneousities to do stuff for only one single player (ie print text on only one player's screen, play sound for player ...) this doesn't cause desync's as long as it's only a visual/audio function that doesn't affect gameplay. |
| 03-08-2005, 09:24 PM | #15 |
So we are agreeing then that Getlocalplayer ( ) would work for a host condition? |
