Post your scripting questions / solutions here
Moderator: Moderators
wacko
Field Marshal
Posts: 2085 Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany
Post
by wacko » Mon Apr 11, 2005 9:53 pm
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_offBut 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 » Mon Apr 11, 2005 11:33 pm
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 » Mon Apr 11, 2005 11:37 pm
tried scripting shooting?
fireheld and useheld still work right? just states die
wacko
Field Marshal
Posts: 2085 Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany
Post
by wacko » Tue Apr 12, 2005 6:41 am
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.
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 » Tue Apr 12, 2005 12:41 pm
If you glue the player, physics won't work for him anyway.
Elgan
Lieutenant General
Posts: 890 Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:
Post
by Elgan » Tue Apr 12, 2005 12:55 pm
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.
wacko
Field Marshal
Posts: 2085 Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany
Post
by wacko » Tue Apr 12, 2005 9:21 pm
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
}
endAny 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 » Wed Apr 13, 2005 5:47 am
Well, I can't think of any.
wacko
Field Marshal
Posts: 2085 Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany
Post
by wacko » Wed Apr 13, 2005 5:51 am
okay, then.
thanks for all the psychological assistance