question about animation

Ask questions, discuss ideas, get answers
Post Reply
Psychodad
Posts: 13
Joined: Tue Oct 09, 2012 4:16 pm

question about animation

Post 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! :)
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: question about animation

Post 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.
User avatar
HJGF
Posts: 233
Joined: Fri Feb 05, 2010 10:28 pm

Re: question about animation

Post 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.
Image
Image
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: question about animation

Post by Swaffy »

But would it just keep looping?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: question about animation

Post 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.
User avatar
HJGF
Posts: 233
Joined: Fri Feb 05, 2010 10:28 pm

Re: question about animation

Post by HJGF »

I would like to check it.
Image
Image
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: question about animation

Post 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
Psychodad
Posts: 13
Joined: Tue Oct 09, 2012 4:16 pm

Re: question about animation

Post 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:
Psychodad
Posts: 13
Joined: Tue Oct 09, 2012 4:16 pm

Re: question about animation

Post 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
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: question about animation

Post 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.
Post Reply