Data of prop_-entities

Avatar
innocentive
52 Posts
Posted Feb 25, 2013
I am wondering if there's a way to get hold of the data that 'forms' a prop-entity like for instance a prop_button. As far as I can see that's nothing more than a prop_dynamic pointing at the switch model combined with a func_button and two ambient generics. But it has special outputs (and maybe even inputs - didn't check).

Since I couldn't find any trace of the according info I assume that it is somehow coded into the engine. Nonetheless I wonder how Hammer can access that info if it was so. And before I give up my search I wanted to confirm my assumption with someone who probably knows better than me ... i.e. with you guys on this forum!

:cube:

Advertisement
Registered users don’t see ads! Register now!
Avatar
Skotty
671 Posts
Posted Feb 25, 2013
Replied 24 minutes later
It's programmed into the game engine. You can't change it without creating a whole new mod and having the source files.
Avatar
innocentive
52 Posts
Posted Feb 25, 2013
Replied 7 minutes later
Nah ... I don't want to change it, I'm just interested in recreating some features of those point entities like for instance a cube 'arranging' himself on a cube button or the particle effect at the end of a light bridge. I would like to apply these features to prop_dynamics/func_brushes and rebuild the original props manually... and the best way to do that would be to see how Valve did it.
Avatar
FelixGriffin
2,680 Posts
Posted Feb 25, 2013
Replied 33 minutes later

innocentive wrote:
I would like to apply these features to prop_dynamics/func_brushes and rebuild the original props manually... and the best way to do that would be to see how Valve did it.

That's going to be really difficult without the code. For some things you'll probably have to line the walls and floors with a grid of triggers (gel and funnels, to name two).

Avatar
innocentive
52 Posts
Posted Feb 25, 2013
Replied 9 minutes later
Ok, I was hoping for a better answer but not really expecting it ... thanks nonetheless. At least I know now that I don't have to chase down that road any more, i.e. looking for the information, and can concentrate on trying to replicate what I see.

On that note, has anyone an idea about how to make a cube slide into the cube button as gently as it happens with a prop_floor_cube_button?

Avatar
Lpfreaky90
2,842 Posts
Posted Feb 25, 2013
Replied 45 minutes later

innocentive wrote:
or the particle effect at the end of a light bridge.

You might be able to use HMW's sendificator script for this. You'll need to find the particles and apply them at the end.

As for the button; you could try using a trigger push?

Avatar
Skotty
671 Posts
Posted Feb 25, 2013
Replied 3 minutes later
Place a func_clip_vphysics with angled sides, like a bowl, parent it to a func_door and make that func_door elevate if a trigger notices a cube in a special area, for example above the button.
Avatar
innocentive
52 Posts
Posted Feb 25, 2013
Replied 16 minutes later
Thanks for those suggestions, Lpfreaky90 and Skotty. I had already tried the point_push method but unfortunately it's not as easy as putting one in the center of the button. The cube just shakes whichever way you put it in and doesn't really move. I'll try a bit more sophisticated approach with the point_push.

And I will try the cliping method. I hadn't thought of elevating the clipping brushes from beneath/inside the button. Sounds very promising!

I'll let you know how my tests went...

Avatar
HMW
806 Posts
Posted Feb 25, 2013
Replied 6 hours later

innocentive wrote:
On that note, has anyone an idea about how to make a cube slide into the cube button as gently as it happens with a prop_floor_cube_button?

I built a thing like this a while ago, for aligning laser cubes. It's a tray shaped like a cube button, with a moving bottom that sort of jiggles the cube into position. It's attached to this post; you can add it to your map as an instance.
I hope it's the right file; I'm on Linux now so I can't load it up in Hammer to check.

It doesn't have the ability to trigger anything (yet), so if you want it to work as a button, you'll need to ad a separate trigger.

As for the light bridge endpoint effect, I'm fairly sure it is possible to create this with an info_particle_system. I'll see if I can look that one up tomorrow.

(Right now it's time for :snooze:)

.

Avatar
FelixGriffin
2,680 Posts
Posted Feb 25, 2013
Replied 54 minutes later
You can do it with a particle system, although I also forget the name. But it has some enable/disable glitches with particles flying to the map's origin.
Avatar
innocentive
52 Posts
Posted Feb 26, 2013
Replied 7 hours later
I have been trying a lot configurations for the two aforementioned methods yesterday evening: (a series of) point_pushes and a func_door raising a func_clip_vphysics positioning device. Unfortunately I couldn't get the desired result with either of those methods. I think the main problem is that a cube that's already touching the bottom of the cube recepticle will rather fall over (i.e. rotate around x and y axis) then slide in (move along x and y axis) when a force is executed on it.

That's why I had more or less the same idea like HMW. A cube would have to be moved from it's bottom side. I looked at your contraption and it's a very clever design. It also works quite well. But I haven't given up yet on finding a smoother solution. If I get there, I'll let you know!

Ah ... and also: I had tested a particle system with the projected wall particles and there were some glitches pointing to the origin. I thought that's just because I don't zip about particle systems yet (haven't worked with them yet) but it might very well be a bug of the code.

Avatar
HMW
806 Posts
Posted Feb 26, 2013
Replied 15 hours later

innocentive wrote:
That's why I had more or less the same idea like HMW. A cube would have to be moved from it's bottom side. I looked at your contraption and it's a very clever design. It also works quite well. But I haven't given up yet on finding a smoother solution. If I get there, I'll let you know!

Cool, if you find anything better, I'm interested!

The light bridge particle system is called "projected_wall_impact". I see what you mean by "glitches pointing to the origin". That particular system seems to use extra control points for the effect. To set a control point, create an info_target with a unique name and enable its "always transmit to client" flag. Then set the "control point xx" attribute of the particle system to the name of that entity.
I messed around with it a bit, and it seems to use control points 2 and 3 as the endpoints, but when starting up it still emits some particles from the info_particle_system itself. You should be able to get a decent result by experimenting with the positions of the various entities.

Avatar
Lpfreaky90
2,842 Posts
Posted Feb 26, 2013
Replied 23 minutes later
The origin problem is known also at valve; it is the reason why PTI maps are not near the origin (or at least weren't). It might be good mapping practice just to stay away from the origin.
Avatar
FelixGriffin
2,680 Posts
Posted Feb 26, 2013
Replied 37 minutes later

HMW wrote:
innocentive wrote:

That's why I had more or less the same idea like HMW. A cube would have to be moved from it's bottom side. I looked at your contraption and it's a very clever design. It also works quite well. But I haven't given up yet on finding a smoother solution. If I get there, I'll let you know!

Cool, if you find anything better, I'm interested!

The light bridge particle system is called "projected_wall_impact". I see what you mean by "glitches pointing to the origin". That particular system seems to use extra control points for the effect. To set a control point, create an info_target with a unique name and enable its "always transmit to client" flag. Then set the "control point xx" attribute of the particle system to the name of that entity.
I messed around with it a bit, and it seems to use control points 2 and 3 as the endpoints, but when starting up it still emits some particles from the info_particle_system itself. You should be able to get a decent result by experimenting with the positions of the various entities.

That's great to know! Thanks!

Avatar
innocentive
52 Posts
Posted Feb 27, 2013
Replied 10 hours later

Lpfreaky90 wrote:
The origin problem is known also at valve; it is the reason why PTI maps are not near the origin (or at least weren't). It might be good mapping practice just to stay away from the origin.

I've heard that before... :wink:

HMW wrote:
innocentive wrote:

That's why I had more or less the same idea like HMW. A cube would have to be moved from it's bottom side. I looked at your contraption and it's a very clever design. It also works quite well. But I haven't given up yet on finding a smoother solution. If I get there, I'll let you know!

Cool, if you find anything better, I'm interested!

I've been experimenting with a couple of different setups the last two days. There is one way that should be very close to what the prop_floor_button does but I can't get one detail to work ... maybe you can help me:

Having tried all sorts of I/O-mechanics, I had the idea to write a simple script. There's a button with a trigger that upon touch by a cube calls a scripted function which
(1) positions a func_clip_vphysics plane just above the floor of the button,
(2) positions a func_door somewhere near (this step would indeed be optional),
(3) parents the func_clip_vphysics to the func_door, and
(4) opens the door into the approriate direction, thus kinda dragging the cube on the vphysics plane into position.
The problem is that I can't seem to change the Move Direction (key: movedir) of the func_door from inside the script. I tried the following line:

EntFire(EntityGroup[1].GetName(), "AddOutput", "movedir 0 180 0", 0)

where EntityGroup[1] is the func_door and "0 180 0" is just some direction other than the original 0 0 0 in the door porperties ... to no avail. I assume that the second space between 0 and 180 might mix the program up because the value for the key actually contains three values. How to inlude that in the script code properly?

PS: In dry testing with a fixed move direction the cube in fact jumped away from the button once ... it totally felt like the ingame button and suggests that Valve did something very similar.

Avatar
FelixGriffin
2,680 Posts
Posted Feb 27, 2013
Replied 9 hours later
I think vectors are sent in params as x,y,z rather than x y z, but don't quote me on that.
Avatar
innocentive
52 Posts
Posted Feb 27, 2013
Replied 5 minutes later
I think I had tried that too ... will try again. But we are dealing with an angle which strictly speaking is not a vector. If I'm not mistaken it's stored as a vector though.
Avatar
FelixGriffin
2,680 Posts
Posted Feb 27, 2013
Replied 4 minutes later
"Vector" in the Source engine just means three numbers together. They don't always represent mathematical vectors, and to do standard vector math on them (as in Sendificate) you need to write your own functions.
Avatar
innocentive
52 Posts
Posted Feb 27, 2013
Replied 9 hours later
Did a couple of more tests. Here's the results:
It is irrelevant whether movedir is a vector or an angle. The main point is that the object to be changed is an combination of <key> and <value>. As such the parameters need to be <String> seperated by <Space> (as in the properties dialog with SmartEdit turned off). For instance, this line works properly:

EntFire (&quot;door&quot;, &quot;AddOutput&quot;, &quot;origin 128 128 0&quot;, 0)

It is interesting to look at this example a little more. Changing the origin of a func_door (either through EntFire or through SetOrigin) leads to the following:
(1) The door is positioned at the new origin.
(2) When the 'Open' input is sent, it moves to the original opening position that was assigned on spawn.
(3) Upon 'Close' it moves back to its spawn position.

In conclusion, it appears that the opening position and the closing position of a func_door are stored seperately from the 'origin' and the 'movedir' keyvalues. However, I'm clueless as to how to address these two. Does anyone have an idea how those keys can be found out?

Advertisement
Registered users don’t see ads! Register now!
Avatar
HMW
806 Posts
Posted Mar 02, 2013
Replied 2 days later
It may be that those attributes are not accessible via a script.
Have you tried parenting the door to another entity (say, an info_target) and moving that other entity?

You should also be able to change the movement direction this way, by rotating the parent entity with SetAngles.