scripted player not working?

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

scripted player not working?

Post 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
Herp derp.
Juryiel
Posts: 103
Joined: Fri Jan 04, 2008 1:18 pm

Re: scripted player not working?

Post 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?
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: scripted player not working?

Post by darksmaster923 »

no, attach camera cmd usually takes that off
Herp derp.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: scripted player not working?

Post by Jay »

Try to change the LevelViewPoint to 1 (but that should only work if you don't want 1st person)
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: scripted player not working?

Post 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
Herp derp.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: scripted player not working?

Post by darksmaster923 »

dash the 90 degree view part its fixed.
the other part i still want
Herp derp.
User avatar
Ransom
Posts: 30
Joined: Sat Jan 14, 2006 7:16 pm

Re: scripted player not working?

Post 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.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: scripted player not working?

Post by darksmaster923 »

oh whoops, forgot
self.ideal_yaw = self.player_yaw;
works fine
Herp derp.
Post Reply