Page 1 of 1

Random spawn points

Posted: Sat Mar 24, 2007 5:29 am
by zany_001
Is there any way to have sevearl spawn points per player and pawn?Would there be a teleport entity on the default start, and it would teleport you to a random place?perhaps

Posted: Sat Mar 24, 2007 5:36 am
by darksmaster923
ya i my little ol thread here
http://www.realityfactory.info/forum/vi ... php?t=1778
you can download respawn scripts and open the script for player here
{

Code: Select all

    Spawn[ ()
    {
        LowLevel("setup");
    } ]

    setup[ ()
    {
        PawnRender(false);
        self.think = "check";
    } ]

    check[ ()
    {
        self.ThinkTime = 0.5;

        if(GetAttribute("playerhealth","Player") < 1)
        {
            SetAttribute("playerhealth", 100,"Player");
            TeleportEntity("Player","spawn_point");
        }

    } ]

}
make it like this put more switches or less instead of teleportentity and rename the spawn_point diff

Code: Select all

	switch(random(1,4))
		{
			case 1
			{
                	TeleportEntity("Player","spawn_point");
			}
			case 2
			{
                	TeleportEntity("Player","spawn_point1");
			}
			case 3
			{
                	TeleportEntity("Player","spawn_point2");
			}
			case 4
			{
                	TeleportEntity("Player","spawn_point3");
			}
		}

Posted: Sat Mar 24, 2007 5:41 am
by zany_001
thanks man thatl be preety important in my game (maybe lol)