Stairs & Piston Platforms

Avatar
Dafflewoctor
415 Posts
Posted Jul 08, 2013
So this is sort of a two part question...

1) There aren't any piston models that I can see that have animations. So I decided to make my own.
I grabbed some models of the pistons and the platform and parented them both to an invisible brush tied to a func_tracktrain. I can get it to move up and down with path_tracks, but when it shows in game, the train tilts to a 90 degree angle, consequently tilting the piston and platform sideways. So number one, are there any piston animations, and even if there are, tell me how I fix this. OR just tell me how pistons are really made.

2) I used what I believe is the PTI stair model because its animations look similar. I'm able to set its animations and everything fine, but when I parent a brush to it to make the actual stairs, it won't move with the stair model.
I can get you the model name if you need it when I get back to my computer with Steam and Hammer on it.

Thanks.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Tmast98
210 Posts
Posted Jul 08, 2013
Replied 1 minutes later
Pistons, as in the things that hold platforms in Portal 1? Those can be made with prop_dynamic models parented to func_movelinears as well, that might be slightly more useful and easier.
Avatar
Tmast98
210 Posts
Posted Jul 08, 2013
Replied 4 minutes later
Oh, regarding that angled glitch, I believe you want it to have a fixed orientation, in the flags. Also, the path_tracks it passes, make them have no change for orientation type property.
Avatar
TeamSpen210
608 Posts
Posted Jul 08, 2013
Replied 11 minutes later
Pistons don't have animations. Portal 2 comes with a few vmfs of official maps to show how the themes are done in the sdk_content/maps folder. "sp_a4_laser_catapult" has two piston platforms in it. Don't look at the pti instance, it has far too much complicated logic. Usually what you want is a nodraw func_door or func_movelinear with the arms parented to it.
All the models made for the PTI are in the props_ingame/ folder.
To get brushes moving with panels you need to set the attachment points. This is a good tutorial.
I'd suggest you don't use the PTI model, the standard arm ("arm64x64_interior.mdl") has some better animations, although you'd have to setup 8 different arms. You want the animations starting with "rampa_stair".
Avatar
Gemarakup
1,183 Posts
Posted Jul 09, 2013
Replied 4 hours later
I don't use the PTI piston lift instance, but I know how to use it if I want to.
Avatar
josepezdj
2,386 Posts
Posted Jul 09, 2013
Replied 3 hours later

Dr.Toaster Waffles wrote:
So this is sort of a two part question...

1) There aren't any piston models that I can see that have animations. So I decided to make my own.
I grabbed some models of the pistons and the platform and parented them both to an invisible brush tied to a func_tracktrain. I can get it to move up and down with path_tracks, but when it shows in game, the train tilts to a 90 degree angle, consequently tilting the piston and platform sideways. So number one, are there any piston animations, and even if there are, tell me how I fix this. OR just tell me how pistons are really made.

You are on the right track. As mentioned above, pistons haven't got any animations, you just use them parented to moving brush entities, like func_tracktrains, func_doors, func_movelinears, etc. As Tmas98 said (dude! glad to see you participating here :thumbup: ), if your train is being spawn at wrong angles it's just because you didn't ticked the flag "Fixed orientation".

Dr.Toaster Waffles wrote:
2) I used what I believe is the PTI stair model because its animations look similar. I'm able to set its animations and everything fine, but when I parent a brush to it to make the actual stairs, it won't move with the stair model.
I can get you the model name if you need it when I get back to my computer with Steam and Hammer on it.
Thanks.

You need 2 outputs for the panels (func_brush) to be actuallly parented to the arm models or panels (call them what you like :smile:). Use a logic_auto and add:


  • OnMapSpawn > [func_brush1] > SetParent > [arm_model1] | delay 0.10
  • OnMapSpawn > [func_brush1] > SetParentAttachmentMaintainOffset > panel_attach | delay 0.10***

And so on with the rest of the func_brushes

Avatar
TeamSpen210
608 Posts
Posted Jul 09, 2013
Replied 10 minutes later
For the pti stair model ("props_ingame/arm_8panel.mdl") you'll need to use the attachment points "panel_attach1" - "panel_attach4". One should be for the lowest stair, four for the top stair brush. To check attachment points, open the model viewer from the authoring tools (the green box hammer is launched from). It's one of the tabs in there.
Avatar
Lpfreaky90
2,842 Posts
Posted Jul 09, 2013
Replied 19 minutes later
As been said before here;
A func_movelinear or a func_door is a better option than a tracktrain, it's easier to setup, and it only is one entity/edict instead of 3. Specially in very large complex maps this is very important.
Avatar
Dafflewoctor
415 Posts
Posted Jul 09, 2013
Replied 2 hours later
I'll try all of these... I knew nothing about func_movelinears or attachment points. Thanks for so many replies.
(and it's great to see you here, tmast.)

TeamSpen210 wrote:
You want the animations starting with "rampa_stair".

I think this might work the best, I was looking through the arm64x64 animations but I couldn't find any stair ones, nonetheless eight of them. Plus I don't want my map to have the exact same PTI animations, I'm actually planning to release this one.

On the pistons...this could be harder, but thanks for the orientation fix. :thumbup:

Avatar
Dafflewoctor
415 Posts
Posted Jul 09, 2013
Replied 14 hours later
Ok, I don't see any attachment point tab in the model browser.

And for func_movelinear, I used the Open input like the wiki said but it won't move.

Avatar
Tmast98
210 Posts
Posted Jul 09, 2013
Replied 22 minutes later
Did you give the func_movelinear a move distance, direction, and speed? If you did and you trigger it to open, not close, it should move.

EDIT: Also, did you parent the prop_dynamic to the func_movelinear? That's very important.

Avatar
Dafflewoctor
415 Posts
Posted Jul 09, 2013
Replied 11 minutes later

Tmast98 wrote:
Did you give the func_movelinear a move distance, direction, and speed? If you did and you trigger it to open, not close, it should move.

EDIT: Also, did you parent the prop_dynamic to the func_movelinear? That's very important.

I was just about to edit my post-it was a naming error gotcha thing. Didn't look closely enough, sorry.

However, my stairs are still failing.

Avatar
TeamSpen210
608 Posts
Posted Jul 09, 2013
Replied 7 minutes later
The attachment point tab is not in the model viewer opened in hammer. There's another one, which is below the hammer option in the Authoring tools launcher (the green dialog that you launch hammer through). The animations aren't in alpphabetical order.

If you want to, you can open up the pti instances to get an idea about how it works. instances/p2editor/stair.vmf is the file for the stairs.

Avatar
josepezdj
2,386 Posts
Posted Jul 10, 2013
Replied 7 hours later

Dr.Toaster Waffles wrote:
I think this might work the best, I was looking through the arm64x64 animations but I couldn't find any stair ones, nonetheless eight of them. Plus I don't want my map to have the exact same PTI animations, I'm actually planning to release this one.

I used the model models/anim_wp/room_transform/arm64x64_interior.mdl in my map "The Second Exodus" (link below in my signature if you want to take a look at it... the stairs are in the near entry, right after the elevator shaft). Same as you mentioned, I didn't want to make a typical PTI stair and such :biggrin: so I inverted the orientation of the animation: they open to a lower level instead of upwards, and I think it's cooler animation than the usual.

The animations you need to use are:
*
rampa_stair01_up?
rampa_stair02_up?
rampa_stair03_up?
rampa_stair04_up?*

(Each of them have a similar angle but a different height so when you put 4 of these models in a row they compose the stairs :wink:)

Check them quickly by going to the model properties in hammer > Model Tab. If you need to place them properly in hammer while mapping, you can select the desired animation from that Model Tab and copy the name, then put that animation name in the Default Animation property and then hit Enter: you will see it keeps that animation all the time, and this makes you put it in place while mapping :wink:

About the logic, well, as I make these stairs "the other way around", I opted for func_movelinears for the func_brushes that were the stairs steps, and make them simply move independently from the arm models (I didn't parent them to them :biggrin:)

EDIT
Nitpicking advice :smile:: Use the complementary model models/anim_wp/room_transform/arm_64x64_rail.mdl for the lowest parts of your arm64x64 models in order to make it actually look like it's installed between the side brushes :wink:

Advertisement
Registered users don’t see ads! Register now!
Avatar
Dafflewoctor
415 Posts
Posted Jul 10, 2013
Replied 2 hours later
Everything's working fine now. I set the attachment point to panel_attach_01, so now it follows the bottom panel.

That was sort of a knowledge growth thing, though. I think I'll use the "rampa" animations because they look less choppy.