Page 1 of 1

question about animation

Posted: Tue Oct 09, 2012 4:21 pm
by Psychodad
good day!

i hope you can help me with some animation.
in bf1942 are two animations:
3PCruch2HatchUpper.baf
3PCruch2HatchLower.baf

it looks like this:
Image

how can i use it in the object.con of a tank to bring it ingame?

thank you! :)

Re: question about animation

Posted: Tue Oct 09, 2012 5:27 pm
by fo0k
heheh, its my gif :)

I assume you got the gif from here ? http://bfmods.com/viewtopic.php?f=8&t=2 ... t=10#p1424

just checking you saw that thread too.

With none of these entry animations being used I would guess its a very difficult task, but will leave it to those more experienced with animation to give thoughts.

Re: question about animation

Posted: Tue Oct 09, 2012 9:32 pm
by HJGF
I'm not sure if this could work but at least it's a beggining.

I took this from "AnimationStatesVehicle"

Code: Select all

rem Passenger in M3a1
AnimationStateMachine.createState Lb_PassengerInM3a1
AnimationStateMachine.addAnimation animations/Vehicle/3PSitM3a1PassLower.baf 1 1
AnimationStateMachine.setMorphFactor 5.0
AnimationStateMachine.setSpeed 0 0 0
AnimationStateMachine.setFlag c_AsmHideWeapon
AnimationStateMachine.setFlag c_AsmLockFreeLook
I guess you could make another state or change the animation of this one "3PSitM3a1PassLower.baf"
Either ways I'm rusty but I hope it helps.

Re: question about animation

Posted: Tue Oct 09, 2012 9:53 pm
by Swaffy
But would it just keep looping?

Re: question about animation

Posted: Tue Oct 09, 2012 11:44 pm
by POTAmatt
I added this to my mod a couple of years ago when FoOK posted this discovery. It doesn't loop, but does go through the motion once upon pressing F9-F12 or the <C>amera key. My only complaint with it is that it is subject to splash damage from grenades and the like. I'd be happy to post what i did for anyone who is interested.

Re: question about animation

Posted: Wed Oct 10, 2012 1:49 am
by HJGF
I would like to check it.

Re: question about animation

Posted: Wed Oct 10, 2012 3:17 am
by POTAmatt
The 'no looping' is highlighted in Red below:

ObjectTemplate.create SeatObject M10GunnerSeat
ObjectTemplate.seatFlags c_SeatShowFullBodySoldier
rem ObjectTemplate.seatFlags c_SeatIsOutside
ObjectTemplate.seatAnimationUpperBody Ub_GoInTankHatch
ObjectTemplate.seatAnimationLowerBody Lb_GoInTankHatch

AnimationStateMachine.createState Ub_GoInTankHatch
AnimationStateMachine.addAnimation animations/Vehicle/3PGoInTankHatchUpper.baf 0.75 c_AsmPlayOnce
AnimationStateMachine.setMorphFactor 5.0
AnimationStateMachine.setSpeed 0 0 0
AnimationStateMachine.setFlag c_AsmHideWeapon

AnimationStateMachine.createState Lb_GoInTankHatch
AnimationStateMachine.addAnimation animations/Vehicle/3PGoInTankHatchLower.baf 0.75 c_AsmPlayOnce
AnimationStateMachine.setMorphFactor 5.0
AnimationStateMachine.setSpeed 0 0 0
AnimationStateMachine.setFlag c_AsmHideWeapon

Re: question about animation

Posted: Wed Oct 10, 2012 6:47 pm
by Psychodad
wow you are fast!
thank you a lot! i try it and give a report then.

we talked about hidden locked things in bf1942 in pfc teamspeak.
the moving sky and so on. and during this i got a link with this gif.
and now i was interested. :)

sorry for bad english! :lol:

Re: question about animation

Posted: Wed Oct 10, 2012 8:20 pm
by Psychodad
i tried it on tiger, but nothing has changed :cry:
what did i wrong?

rem *** TigerPassengerSeatR ***
ObjectTemplate.create SeatObject TigerPassengerSeatR
ObjectTemplate.seatFlags c_SeatShowFullBodySoldier
ObjectTemplate.seatFlags c_SeatIsOutside
ObjectTemplate.seatAnimationUpperBody Ub_Cruch2Hatch
ObjectTemplate.seatAnimationLowerBody Lb_Cruch2Hatch

AnimationStateMachine.createState Ub_Cruch2Hatch
AnimationStateMachine.addAnimation animations/3P_NoWeapon/3PCruch2HatchUpper.baf 0.75 c_AsmPlayOnce
AnimationStateMachine.setMorphFactor 5.0
AnimationStateMachine.setSpeed 0 0 0
AnimationStateMachine.setFlag c_AsmHideWeapon

AnimationStateMachine.createState Lb_Cruch2Hatch
AnimationStateMachine.addAnimation animations/3P_NoWeapon/3PCruch2HatchLower.baf 0.75 c_AsmPlayOnce
AnimationStateMachine.setMorphFactor 5.0
AnimationStateMachine.setSpeed 0 0 0
AnimationStateMachine.setFlag c_AsmHideWeapon


rem *** TigerPassengerSeatL ***
ObjectTemplate.create SeatObject TigerPassengerSeatL
ObjectTemplate.seatFlags c_SeatShowFullBodySoldier
ObjectTemplate.seatFlags c_SeatIsOutside
ObjectTemplate.seatAnimationUpperBody Ub_Cruch2Hatch
ObjectTemplate.seatAnimationLowerBody Lb_Cruch2Hatch

AnimationStateMachine.createState Ub_Cruch2Hatch
AnimationStateMachine.addAnimation animations/3P_NoWeapon/3PCruch2HatchUpper.baf 0.75 c_AsmPlayOnce
AnimationStateMachine.setMorphFactor 5.0
AnimationStateMachine.setSpeed 0 0 0
AnimationStateMachine.setFlag c_AsmHideWeapon

AnimationStateMachine.createState Lb_Cruch2Hatch
AnimationStateMachine.addAnimation animations/3P_NoWeapon/3PCruch2HatchLower.baf 0.75 c_AsmPlayOnce
AnimationStateMachine.setMorphFactor 5.0
AnimationStateMachine.setSpeed 0 0 0
AnimationStateMachine.setFlag c_AsmHideWeapon

Re: question about animation

Posted: Thu Oct 11, 2012 3:45 am
by POTAmatt
Double check your code, or better, run the debugger if you have it. For starters, it appears you are defining both of these twice:

AnimationStateMachine.createState Ub_Cruch2Hatch

AnimationStateMachine.createState Lb_Cruch2Hatch

My guess is you are not calling either of those seat objects (TigerPassengerSeatR or TigerPassengerSeatL), though. I'd start by keeping it simple. Make one seat object and use it in place of an existing one that you know works.