how do you trigger a cycler_sprite? Created 18 years ago2006-08-27 21:06:47 UTC by eightballrota eightballrota

Created 18 years ago2006-08-27 21:06:47 UTC by eightballrota eightballrota

Posted 18 years ago2006-08-27 21:06:47 UTC Post #194856
I added this to a post I made about models, but some may have missed it. I have a nice model of a cafe table that has animations. First animation is idle, 2nd is falling over, 3rd is lying on the floor. I know I can set it in a map as a cycler_sprite, and encase it in a null-textured box to make it solid, but how do I trigger the animations? I'd like it if the table would fall over when shot (or even when 'used' if possible) and then just stay on the floor. 3d_mike has a few hookers in de_deadlock that are animated, they fall on the ground when you shoot them, but i think in his case he took a hostie model, and split it into 2 animations. (i tried to decompile usiong winBSP but it just crashes, although i can decompile other maps ok) My model is already animated (its the cafe.mdl from condition zero de_stadium) sorry for all the noob questions. My map is near complete and this is the last little detail holding it up. You guys have been very helpful and my map wouldn't be any where near as good without all the help.
Posted 18 years ago2006-08-28 04:39:32 UTC Post #194881
The only way to pull this off, is to use multiple cyclers and toggle their visibility, once needed.
To make the table fall over - you should make 3 cycler_sprites. First with the idle animation, second with the falling over animation and the third one with the idle fallen over animation.

Now you place all 3 in one place, you make the 2nd and the 3rd table cyclers invisible (Render mode to Solid or Texture and FX ammount to 0), and you keep the 1st one visible. Now you'll have to encease the table with an invisible func_button (clip it, to make it match the table).

The button's properties:
Target: table_fall_mm
Health if shootable: Depends on how many shots you want fired at the table, to make it fall over. I'd use something like 25.

Now once you use or shoot the button for 25 hp - it triggers the fall over multi_manager.

To make the fall look realistic - you'll have to trigger 4 env_renders, to hide/show the animations of the falling table.
1st - hides the idle cycler (table_idle)
2nd - shows the falling table cycler (table_fall)
3rd - hides the falling table cycler (table_fall)
4th - shows the idle fallen over sprite (table_fallen)

You will also need some ambient_generics for the table fall sound, to make it all more realistic.

The multi_manager properties:
render1 0
render2 0
fall_sound 0
render3 <the length of the falling animation>
render4 <the length of the falling animation>

Now there will be only one problem - the bounding button. It would look really stupid, if the fallen over table had the same boundings, as the 1st table, wouldn't it? Luckily - func_buttons have the same properties, as func_doors. Accordingly to the table height - you'll have to make the button go down, to match the height of the fallen over table. You'll just have to make sure, that the 'Don't move' flag is not ticked.

And that's it. To make it reset next round - you'll have to make a multi_manager, named 'game_playerspawn' and trigger 3 more env_renders, to hide the 2nd and the 3rd table cyclers, and show the 1st idle table cycler.

It's a pretty complex entity setup, although it should work pretty good with proper timing. :)
I'd make an example map, but I don't have HL atm.
Daubster DaubsterVault Dweller
Posted 18 years ago2006-08-28 10:36:16 UTC Post #194922
That does sound complicated, but I'm only gonna do it for about 4 or 5 tables, so it shouldn't be too involved. Ill try it out and see how it works. If I get it to work, ill make and example map and upload it for others to try. Thanks for the help.
Posted 18 years ago2006-08-28 17:55:02 UTC Post #194953
okay, i did the above instructions (well, i simplified a little, i just used a func_breakable to trigger the multi_manager) but its not displaying the "falling" animation properly. Here is the test map I made. Could someone check this out and see what happenned? I included the model file, and the RMF
http://www.geocities.com/heretic66/test_table.zip
Posted 18 years ago2006-08-29 02:18:11 UTC Post #194974
You need 3 models for each animation, since cycler can only show the idle animation. :)
Daubster DaubsterVault Dweller
Posted 18 years ago2006-08-29 08:19:27 UTC Post #194997
oh, okay, so i need three seperate models, each one showing the animation i need. okay. I thought maybe i could get away with using the same model with all three animations, and setting the 'model only sequence # of animation' to the sequence i wanted to show. It actually worked in hammer(check out my example map), just not in the map. If i set the 'model only seq#' to '1', it just shows the table falling over and over again.
Oh well, I kinda figured that, becuase 3d_mike's de_deadlock used seperate models for the hookers falling and gettin shot. I'll let ya know how it comes.
You must be logged in to post a response.