Page 1 of 1
Enity climb a ladder?
Posted: Thu Oct 09, 2003 2:18 pm
by Vic Marrow
Is it possible to make an enity climb a ladder. If so how would you script it?
Posted: Thu Oct 09, 2003 5:40 pm
by Vic Marrow
I tried useing the animation "wallclimb_guy2_main" and this might work the only thing is the wallclimber.tik says the enity will climb a 10ft wall (160 units) but I need him to climb 260 units. So my guy makes it half way up, then jumps over and back down where he started.
Posted: Mon Oct 27, 2003 6:17 pm
by Vic Marrow
Ok I did this
Code: Select all
climb_ladder:
self anim ladder_up_lefthand
self waittill animdone
self.orgin = (56 -136 139)
self anim ladder_up_righthand
self waittill animdone
self.orgin = (56 -136 158)
self anim ladder_up_lefthand
self waittill animdone
self.orgin = (56 -136 177)
self anim ladder_up_righthand
self waittill animdone
self.orgin = (56 -136 196)
self thread climb_ladder
end
And this makes the enity look like he's climbing and he keeps climbing and climbing. But is there a way to make the enity move up in Z direction?
I tried to change the Z orgin after each animation but he stays on the ground. The climbing thread sure looks good just like hes climbing. Just got to figure out how to make him move upwards.
Posted: Mon Oct 27, 2003 7:13 pm
by jv_map
Use anim_noclip instead.
Posted: Mon Oct 27, 2003 9:14 pm
by Vic Marrow
How would you incorprate anim_noclip into the script? Would it go before or after the animation or replace it? Thanks for your help jv_map!!!!
Posted: Tue Oct 28, 2003 7:49 am
by jv_map
Replace 'anim' with 'anim_noclip'

Posted: Tue Oct 28, 2003 7:10 pm
by Vic Marrow
Yes jv_map this worked.

I have
Code: Select all
climb_ladder:
self anim_noclip ladder_up_lefthand
self waittill animdone
self anim_noclip ladder_up_righthand
self waittill animdone
self thread climb_ladder
end
The ai will climb up and up and up. He goes all the way to the top of the sky box!!!!!!! How would you get the ai to stop at a certain waypoint? I tried the self.orgin thing but the ai would only climb so high no matter how many orgin commands I put in. I need him to stop at Z400 and I gave commands all the way up to Z500 but he still stoped at about Z285. When I put in the line "self thread climb_ladder" at the end it looped the thread and he kept climbing to the top of the sky box. How could I control this thread?
Posted: Wed Oct 29, 2003 3:08 pm
by Vic Marrow
I got it to work. The ai will climb the ladder on the side of the submarine conning tower, when he gets to the top he jumps over the edge right onto the deck of the conning tower and stands idle.(cool)
Here's my thread
Code: Select all
climb_ladder:
self anim_noclip ladder_up_lefthand
self waittill animdone
self anim_noclip ladder_up_righthand
self waittill animdone
self anim_noclip ladder_up_lefthand
self waittill animdone
self anim_noclip ladder_up_righthand
self waittill animdone
self anim_noclip ladder_up_lefthand
self waittill animdone
self anim_noclip ladder_up_righthand
self waittill animdone
self anim_noclip ladder_up_lefthand
self waittill animdone
self anim_noclip ladder_up_righthand
self waittill animdone
self anim_noclip ladder_up_lefthand
self waittill animdone
self anim_noclip ladder_up_righthand
self waittill animdone
self anim_noclip ladder_up_lefthand
self waittill animdone
self anim_noclip ladder_up_righthand
self waittill animdone
self anim_noclip ladder_up_lefthand
self waittill animdone
self turnto $path4
self anim_noclip jumpgate
self turnto $path4
self waittill animdone
wait 1
self anim idle
end
So yes an ai can climb a ladder. You must position the ai to the ladder, then keep adding
self anim_noclip ladder_up_lefthand
self waittill animdone
self anim_noclip ladder_up_righthand
self waittill animdone
The more you add the higher the ai will climb. (The .orgin was messing it up)
Thanks jv_map for the "anim_noclip" this command made it possible

Posted: Wed Oct 29, 2003 8:59 pm
by jv_map
My pleasure
