1st person and 3rd person view in mp
Posted: Mon May 21, 2012 8:02 am
Hi, i want to switch between 1st person view and 3rd person view in my multiplayer map for all players. By the window 1st and other places 3rd.
So i make trigger multiple by the window and type
But it works only for one player. And when other player comes to trigger and run it, view is chnanging not for him, but again for that one player, who run the map.
So i make trigger multiple by the window and type
Code: Select all
while(1)
{
for (local.i = 1; local.i <= $player.size; local.i++)
{
local.player = $player[local.i]
if (local.player isTouching $cam_trigger1)
{
local.player thread 1stcam
}
waitframe
}
}
1stcam:
setcvar cg_3rd_person 0
wait 1
goto 3rdcam
end
3rdcam:
setcvar cg_3rd_person 1
end