Need help with setting up logic_auto entity

Avatar
gabarise
6 Posts
Posted May 15, 2012
A week ago I started learning to use Hammer and am now in the process of learning how to set up dynamic props and created my first "reattaching" panel. However my logic_auto entity doesn't seem to trigger through map spawn as is set.

I have set up my relay properly and what basically happens is the model won't go on idle as the logic_auto should have fired onmapspawn but will activate the sequence from SEQUENCE to SEQUENCE_idleend whenever my trigger brush is touched, which is what is intended.

In short, what visually happens is the animation skips from SEQUENCE_idleend to the first frame of the sequence, which is then played, being the panel coming back in place, and then finally setting the default animation to SEQUENCE_idleend.
Did I forget something?
Will provide vmf and bsp on request!
You might see me around the forums more than usually, as I work my ass off in my first map which should probably contain a bit of everything I learn through this first journey.

On a completely different subject, though, I was wondering what you thought of this : is the glass breakable with func_breakable_surf realistic enough? I want to make glass shatter after being hit with a cube. Screenshots from the wiki make it more look like the crappy CS:S glass.
I would like to have your opinion on this workaround : do you guys think making the cube bounce from the glass to the player's head, activating a "knockout" player camera (maybe the one from the SP campaign end),then replacing the glass model with a broken one before the player stands up again would be reasonably feasible?

Advertisement
Registered users don’t see ads! Register now!
Avatar
taco
504 Posts
Posted May 15, 2012
Replied 21 minutes later
Those are some of the most confusing sentences I have read in a while.

What exactly do you want the panel to do? Do you want it to hold still at the end of the animation? Each prop Dynamic has a field called 'Hold Animation'. If you set that to yes, it will hold the last frame of the last animation that it plays.

Are you just wanting the panel to go in and out? If so, never use an idle animation. Simpley play the animation for it to travel in one direction and set animation rate to -1 to make it go in the other direction. This of course would be coupled with the previously mentioned 'Hold Animation'.

Avatar
spongylover123
944 Posts
Posted May 15, 2012
Replied 4 minutes later
Every glass fracture I used as a prop_dynamic_override will break if you add the output "Break".
Those are more realistic
Avatar
gabarise
6 Posts
Posted May 15, 2012
Replied 1 hour later

taco wrote:
Those are some of the most confusing sentences I have read in a while.

What exactly do you want the panel to do? Do you want it to hold still at the end of the animation? Each prop Dynamic has a field called 'Hold Animation'. If you set that to yes, it will hold the last frame of the last animation that it plays.

Are you just wanting the panel to go in and out? If so, never use an idle animation. Simpley play the animation for it to travel in one direction and set animation rate to -1 to make it go in the other direction. This of course would be coupled with the previously mentioned 'Hold Animation'.

I must've lost myself in my own paragraphs. The process should've been as follows
1: Map is loaded
2: Logic_auto changes the default animation from _idleend to _idle (panel is hanging out)
^ This is to make attaching the panel to the bone easier
3: Player walks in trigger, model executes animation, then ends as _idleend, which is basically the panel fitted in its socket
4: Player is happy that map has pretty animations

So I only have parts 1 and 3 actually working.

I'll try out the glass!
To avoid any exploits, how can I make the glass vulnerable to cubes only?

Avatar
ChickenMobile
2,460 Posts
Posted May 15, 2012
Replied 3 hours later
Use a filter on your trigger. (filter_activator_class -> prop_weighted_cube)
Avatar
Lpfreaky90
2,842 Posts
Posted May 15, 2012
Replied 1 hour later

gabarise wrote:
I must've lost myself in my own paragraphs. The process should've been as follows
1: Map is loaded
2: Logic_auto changes the default animation from _idleend to _idle (panel is hanging out)
^ This is to make attaching the panel to the bone easier
3: Player walks in trigger, model executes animation, then ends as _idleend, which is basically the panel fitted in its socket
4: Player is happy that map has pretty animations

So I only have parts 1 and 3 actually working.

I'll try out the glass!
To avoid any exploits, how can I make the glass vulnerable to cubes only?

The panel:
Prop_dynamic
name: panel
default animation: _idleend

the brush:
func_brush
name: panel_brush
parent: panel

logic_auto:
onmapspawn; panel_brush; SetParentAttachmentMaintainOffset; panel_attach; 0
OnMapSpawn; panel; setanimation;idle; 0.5
OnMapSpawn; panel; setdefaultanimation; idle; 0.5

trigger_once:
onstarttouch; panel; setanimation; <>,0
OnStartTouch; panel; setdefaultanimation; idleend,0

what the logic_auto does
first let the func_brush move along with the top part of the panel.
then set the animation to idle, so it is hanging. This has a delay of half a second so you're sure the attachment step is done. (players will take more then half a second to exit the elevator anyways.
then set the defaultanimation to idle so if the animation you gave it in step 2 is done it will continue to do that animation.

The trigger once sets the animation properly and after the animation is done it will revert to the default animation _idleend so it's normal again.

@chicken: wrong thread? :razz:

Avatar
ChickenMobile
2,460 Posts
Posted May 15, 2012
Replied 51 minutes later

gabarise wrote:
I'll try out the glass!
To avoid any exploits, how can I make the glass vulnerable to cubes only?

Sorry if any confusion followed... :razz:

Advertisement
Registered users don’t see ads! Register now!
Avatar
gabarise
6 Posts
Posted May 15, 2012
Replied 10 hours later
Gonna give all those a shot!