Panel starting position

Avatar
Joni
6 Posts
Posted May 13, 2011
Hey,
i'm quite new to this mapping thing (CSS and CS1.6)
Earlier today i was trying to make a panel which moves.
The normal in to out ones worked fine, but:
When i want the arm to start fully extended, and then go to it's inner positions. All my tries got screwed up.
I would appreciate if someone could help me...

Joni

Advertisement
Registered users don’t see ads! Register now!
Avatar
msleeper
4,136 Posts
Admin
Posted May 13, 2011
Replied 22 minutes later
You need to use a logic_auto to tell the panel to start in it's extended animation when the map loads, and then whenever you want it to move you trigger it's movement animation.
Avatar
Joni
6 Posts
Posted May 14, 2011
Replied 8 hours later
Thank you :smile:
Ill try it out
Avatar
DaMaGepy
361 Posts
Posted May 14, 2011
Replied 4 hours later
No need for any auto, thats only to parent panels to the arm
Just set the Default Animation property (to something idle, for example the reached out pos), or you can set the default anim at the model tab (I only set it here, the default animation is empty for me, but maybe setting the default anim property is better).
And when u want it to move back, just use in a trigger: SetAnimation (movinganim) and then 0.1 sec later setdefaultanimation (otheridleanim).
This means it starts to play the movinganim, and whenever its finished (played) it whill show the default animation. If u dont change the defaultanim, it will jump back to the starting pos (idle). It doesnt matter when you set the defaultanim, since it will only read the animname from there after it finished the animation.
So by default, every model plays its idle animation (moves, does things or just staying still, there are a lot of anim). Then when it gets the command to play an animation, it starts to play, at this point u should select an anim thats starting pos is your idle pos. After done with the anim, it returns doing its idle anim. Thats why u need to change this ide anim before it finished to play, to a still anim, thats displays the animation's end stage. Not all animation ends in a position that has an idle notmoving position.

so for example if by default the arm (arm64x64_interior.mdl) is stretched up, then the default (model) anim is 128_idle (reached up by 128 unit and not moving), then when activated to pull back down with a trigger, SetAnimation to 128_in_straight 0.0, and SetDefaultAnimation bindpose 0.1
to reach up again: SetAnimation to 128_out_straight 0.0, and SetDefaultAnimation 128_idle 0.1

128_idle - idle (not moving) "animation" reached out pose
128_in_straight - anim to move from 128_idle to bindpose (pulling down)
bindpose - Normal starting pos, when its down
128_out_straight - anim to reach up 128 unit (from bindpose to 128_idle)

just experiment with the modelbrowser (world model - Browse - sequences tab) rotate the prop if for example u wan it to reach out vertically.

Avatar
Joni
6 Posts
Posted May 14, 2011
Replied 10 hours later
I have another problem, too:
When i select a animation in the tab, and clicks Apply, it turns into another anim than i selected...
(Might BETA have something to do with it?)
Avatar
msleeper
4,136 Posts
Admin
Posted May 14, 2011
Replied 7 minutes later
The animations in Hammer are just a preview, they will be correct in-game.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Omnicoder
299 Posts
Posted May 14, 2011
Replied 3 minutes later

Joni wrote:
I have another problem, too:
When i select a animation in the tab, and clicks Apply, it turns into another anim than i selected...
(Might BETA have something to do with it?)

Just a Hammer bug, it's been around since the beginning of time. The only way I've seen to get around it is to apply after selecting the new animation and then click another model prop before closing the dialog and it won't change the selected animation back.