Shooting while physics are off

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Shooting while physics are off

Post 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?
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post 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... :)
An ambiguous question will get a similar answer...
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

tried scripting shooting?

fireheld and useheld still work right? just states die
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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 :)
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

If you glue the player, physics won't work for him anyway.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post 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.
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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?
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Well, I can't think of any. ;)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

okay, then. :)
thanks for all the psychological assistance :wink:
Post Reply