Page 1 of 1
force spectator teleport to player start
Posted: Wed Jun 10, 2015 4:14 am
by doomero
Well i want to know if is possible when a player go to spectator, after he enter for play the map, force him to the player start or map spot with a specific tid. I am making a spect room and i need all the spectators go to that room.
RE: force spectator teleport to player start
Posted: Wed Jun 10, 2015 10:47 am
by Monsterovich
You cannot give spectator a TID that means you can't use SetActorPosition on them.
You can try this, because spectators are actors too.
Code: Select all
// when player joins the game as spectator
script 1 open clientside
{
int target = 666;
SetActorPosition (0, GetActorX(target), GetActorY(target), GetActorZ(target), false);
}
// when player spectates
script 2 (int player) disconnect clientside
{
int target = 666;
if (PlayerIsSpectator(player) > 0)
SetActorPosition (0, GetActorX(target), GetActorY(target), GetActorZ(target), false);
}
If it doesn't work, enjoy zandro.
RE: force spectator teleport to player start
Posted: Wed Jun 10, 2015 1:59 pm
by Watermelon
Monsterovich wrote:
If it doesn't work, enjoy zandro.
Wrong:
If it doesn't work, make a tracker ticket and discuss it with the devs and see what can be done.
RE: force spectator teleport to player start
Posted: Wed Jun 10, 2015 6:12 pm
by doomero
Thanks for the answer, but that script is not working....
RE: force spectator teleport to player start
Posted: Thu Jun 11, 2015 6:00 am
by CloudFlash
Do I have to remind you that spectators can freely use noclip, and as such they can a)enter the spectator's room from pretty much any given point on the map, b)quit the spectator's room with little to no effort?
Also do I have to remind that it's possible to disable spectators from being able to talk to players in game, which is a way easier method of preventing them from spoiling the secrets/breaking the flow of the game via insanely helpful tips?
RE: force spectator teleport to player start
Posted: Thu Jun 11, 2015 6:10 am
by Catastrophe
doomero wrote:
Thanks for the answer, but that script is not working....
You must loop the open clientside script for it to work on clients who have connected AFTER a map has begun.