Page 1 of 1

scripted player not working?

Posted: Fri Feb 01, 2008 3:14 am
by darksmaster923
im running this on my laptop which uses vista <_<
but when i run this script:

Code: Select all

{
	Health		[playerhealth]
	HP			[100]
	JumpForce	[100]
	
	Spawn[ ()
	{
		Console(true);
		LowLevel("setup");
	} ]
	
	setup[ ()
	{
		PlayerToPosition(0, 0, 0, false);
		AttachCamera();
		PlayerRender(false);
		self.think = "controls";
	} ]
	
	controls[ ()
	{
		if(IsKeyDown(15) = true)
		{
			PositionToPlayer(0,0,0);
		}
	} ]
}
It only kinda works. i could still see the gun, the hud! WTF. and my controls are messed up

Re: scripted player not working?

Posted: Fri Feb 01, 2008 4:00 am
by Juryiel
PlayerRender(false) won't hide the hud, there's a separate command for that.

As far as the gun, can't you just make him not have one?

Re: scripted player not working?

Posted: Fri Feb 01, 2008 4:08 am
by darksmaster923
no, attach camera cmd usually takes that off

Re: scripted player not working?

Posted: Fri Feb 01, 2008 2:37 pm
by Jay
Try to change the LevelViewPoint to 1 (but that should only work if you don't want 1st person)

Re: scripted player not working?

Posted: Sat Feb 02, 2008 2:17 am
by darksmaster923
what if you want first person?
and it also views from a 90 degree side. Like if i press D which is to go right, i go forward

Re: scripted player not working?

Posted: Sat Feb 02, 2008 3:00 am
by darksmaster923
dash the 90 degree view part its fixed.
the other part i still want

Re: scripted player not working?

Posted: Sat Feb 02, 2008 5:09 am
by Ransom
Place the PlayerStart entity inside an area your scripted player will never get to; eg, a small hidden room behind a wall. That will keep the default player from interfering with your scripted one in anyway.

Re: scripted player not working?

Posted: Sat Feb 02, 2008 6:11 am
by darksmaster923
oh whoops, forgot
self.ideal_yaw = self.player_yaw;
works fine