Page 1 of 1

Shooting while physics are off

Posted: Mon Apr 11, 2005 9:53 pm
by wacko
I have a little car ride where I glue the player to the car like

Code: Select all

	local.player glue $carseat
	local.player forcelegsstate CROUCH_IDLE
	local.player physics_off
But now, he can't shoot anymore until physics are turned on again.
Q1 Is this normal?
Q2 Any chance to change this?

Posted: Mon Apr 11, 2005 11:33 pm
by Grassy
If physics are off all you can do is look around.
Can you just glue the player and not turn off physics, if they take damage then make them immune for the ride, bit unfair though... :)

Posted: Mon Apr 11, 2005 11:37 pm
by Elgan
tried scripting shooting?

fireheld and useheld still work right? just states die

Posted: Tue Apr 12, 2005 6:41 am
by wacko
Grassy wrote:Can you just glue the player and not turn off physics, if they take damage then make them immune for the ride, bit unfair though... :)
Will try this... I think though to have experienced that the forcelegsstate didn't work so reliably... mmm.... :?

@Elgan, if I could at all, this would be too much trouble. :wink:

thanks for ur help both of u :)

Posted: Tue Apr 12, 2005 12:41 pm
by Rookie One.pl
If you glue the player, physics won't work for him anyway.

Posted: Tue Apr 12, 2005 12:55 pm
by Elgan
ohh i see what ur trying to do now.


if i remember right things still worked with glue when i glued a player to a script origin , physics still work u just cant move. free physicaly, still shoot though.

if not why not just keep the player in the cars origin urself with a nice loop.

Posted: Tue Apr 12, 2005 9:21 pm
by wacko
ok. as I only wanted the player to remain seated, I could kick the physics stuff and did it with a loop like this:

Code: Select all

lorerun:
	local.player = parm.other
	...
	local.player glue $loreseat
	local.player.sitdown = 1
	local.player thread lore_sitdown
	$lore followpath $lorepath
	$lore waitmove
	local.player.sitdown = 0
	local.player unglue
	...
end
lore_sitdown:
while(self.sitdown == 1)
	{
	self forcelegsstate CROUCH_IDLE
	wait .1
	}
end
Any idea for improvement?

Posted: Wed Apr 13, 2005 5:47 am
by Rookie One.pl
Well, I can't think of any. ;)

Posted: Wed Apr 13, 2005 5:51 am
by wacko
okay, then. :)
thanks for all the psychological assistance :wink: