Customising models (creating laser 'splitter' cubes)

Avatar
El Farmerino
393 Posts
Posted Apr 23, 2012
Not even sure if this would even be possible, but I thought I'd ask anyway in case someone knows. Basically, I had an idea for a puzzle involving a slight alteration to the regular laser cube - making it a kind of 'beam splitter' with two (or more) outputs. I'd like to have a crack at it as a bit of a challenge for myself, but I'm not really sure how best to go about it. Presumably I'd need one of these programs for the model itself, but I'm not sure which would be best to go for:
https://developer.valvesoftware.com/wiki/Model_editor

I've had a play around with Maya a bit in the past, but really I'm pretty much a beginner and I'm not really interested in going deep into it; I just want to make a few slight alterations to the existing model.

I'm also not sure how you would go about making them functional either, so if anyone has any tips on that they'd be appreciated.... Or if anyone with experience thinks it would probably be way too difficult for a beginner to attempt, that would be good to know too!

One other thing - has anyone come up with a way to rotate a laser cube that you're carrying yet? Something like being able to 'flip' cubes with the arrow keys or something would be really useful in increasing the scope of options for laser puzzles...

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Apr 23, 2012
Replied 1 hour later
If you could even split one laser into two different ones, that would be amazing. Saying this of course: you would need to physically change the way lasers act when passed through a cube. That may be overwhelmingly difficult seeing as we have no access to game code as it is not publicly released!
Perhaps you can cheat the system and create a laser emitter which is parented to your cube model.

As for rotating the cube: this would also require advanced techniques in order to even get it slightly working. You could bind the arrow keys to a script however this might mess with already existing bindings (I know of one lefty who uses the arrow keys instead of WASD).
It is possible to set the angles of a certain entity in the map, however I am not sure what this will have effect on holding the cube as whenever you hold a laser-cube, as it rotates a specific way automatically.

Avatar
Soundlogic
169 Posts
Posted Apr 23, 2012
Replied 5 hours later
While making it split would be near impossible, making it so you can rotate it is quite easy. There is a variable that lets you rotate it using the right mouse button. You can see it in action in my level with the 'static' cubes. I don't have access to it right now, but it exists.
Also: If changing the model on the laser receiver works, it should be possible to make a laser splitter by having a cube with a receiver that turned on two emitters. Changing the emitter models is buggy though, I think you need a model with a special bone.
Avatar
spongylover123
944 Posts
Posted Apr 23, 2012
Replied 9 minutes later
currently, to rotate laser cubes, is by faking it with the portal laser method (env_laser, func_physbox, prop_dynamics, info_particle_systems, prop_physics), and the command sv_enableholdrotation. since the playtesters had a hassle to turn the cube to their view, it was made to always face the player's direction.
I decompiled the laser cube model and the emitter, and they have a special laser attachment bone.
Avatar
Soundlogic
169 Posts
Posted Apr 23, 2012
Replied 6 minutes later
For the record, what is the laser attachment bone called? And for the laser catcher, is there anything fancy about the model?
Avatar
RustyDios
154 Posts
Posted Apr 23, 2012
Replied 40 minutes later
You could try parenting a couple of laser relays and emitters to a cube... I did a quick mock up of this and it worked rather well... but it did have some clipping issues ... but with some time and effort it would work... I had it so when the laser relays were powered they activated the emitters, and the emitters where facing different directions... ... so the relay gets activated from one direction (say from north) and the emitters fire in two directions (say east and west).... it might work using catchers too, but for my quick mock up I used relays.... ... I'm not sure if that is what you were after ?...
Avatar
Soundlogic
169 Posts
Posted Apr 23, 2012
Replied 23 minutes later
Where you able to override the models on the catchers/relays?
Avatar
spongylover123
944 Posts
Posted Apr 23, 2012
Replied 9 minutes later

Soundlogic wrote:
For the record, what is the laser attachment bone called? And for the laser catcher, is there anything fancy about the model?

the attachment for the emitter is laser_attachment, currently the emitter model has a base, the tip top, and the back.

the cube's attachment is focus.

currently I can't find the hbox for the model for the cube.

Avatar
shad0w440
51 Posts
Posted Apr 23, 2012
Replied 6 hours later

spongylover123 wrote:
Soundlogic wrote:

For the record, what is the laser attachment bone called? And for the laser catcher, is there anything fancy about the model?

the attachment for the emitter is laser_attachment, currently the emitter model has a base, the tip top, and the back.

the cube's attachment is focus.

currently I can't find the hbox for the model for the cube.

Hitboxes you have to code into the models qc you can create them in hlmv and then it will generate a code for them paste that into your qc and you should be fine

Avatar
Soundlogic
169 Posts
Posted Apr 23, 2012
Replied 16 minutes later
I don't know much about models, so I don't know if this is even possible, but what happens if you create a model with multiple of those bones?
Avatar
shad0w440
51 Posts
Posted Apr 23, 2012
Replied 10 minutes later

Attachments?
Well I don't know myself either nothing will happen or a beam will be emitted from the two it depends how the entity with the model in question is supposed to do with the attachments (so try to name them the same) but attachments aren't physical bones on the model but points where particle effects can be anchored

you can add new attachments by adding then to the qc

https://developer.valvesoftware.com/wiki/$attachment

Advertisement
Registered users don’t see ads! Register now!
Avatar
RustyDios
154 Posts
Posted Apr 23, 2012
Replied 19 minutes later

Soundlogic wrote:
Where you able to override the models on the catchers/relays?

Erm.. no.. I used two env_portal_lasers and four prop_laser_relay's. All completely overlapping in Hammer with a prop_weighted_cube at the centre (namely for reference!), each set at a different angle. Then I made some cubeblock func_brushes textured with tools_invisible to the size of the lasers/emitters and overlapped them as well (making a big 3D + sign effectively). Then parented everything to the cube. I set the targetname of the emitters to mobileemits and had each laser_relay have the outputs onpowered>mobileemits>turnon & onunpowered>mobileemits>turnoff ......

It did turn out to be a bit clumsey and huge, almost bumbleball style in its physical movement and I needed to approach it at certain angles. But I was able to "grab the centre cube" and move the entire thing around. If I put any relay in the path of a laser the two emitters fired in the direction they were facing... ..

I did say it would need work, time and effort to be an effective part of a puzzle/map but the concept is sound... ... ...

^^ Above = Blah Blah Blah ... erm nope, I didn't edit any models as per the OP request, but I'm sure someone with better knowledge of modelling then me can use this idea to construct a cube model from the models we have, saying you can access the laser_relay and emitter models, splitt them apart and cut/copy/paste into something new.... I don't know, I'm a newbie mapper not a moddler ... :smile: