rotating room

Avatar
protoborg
288 Posts
Posted Mar 15, 2013
How would I make a room rotate? I know I could make several rooms that represent the room in its rotated states, but that seems like it would be rather cumbersome to do. I know it is possible to make a section of a map rotate around a point. The map that uses the energy panels has a section that rotates so it is clearly possible to do it. I am just wondering how I would make it happen since you can't parent an instance and all the items I need to rotate with the room are instances. If anyone can help I would appreciate it.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 15, 2013
Replied 11 minutes later
collapse all instances; make each brush a func_brush; each model a prop_dynamic and parent everything to the thing that rotates!
Avatar
FelixGriffin
2,680 Posts
Posted Mar 15, 2013
Replied 1 hour later
You probably want a func_door_rotating. And make the brushes Solid BSP afterward so they're solid.
Avatar
TopHATTwaffle
113 Posts
Posted Mar 16, 2013
Replied 20 hours later
As LP said, make every brush a func_brush, turn all props into a prop_dynamic (Prop_Dyanmic_override if it does not support a prop_dynamic) Then if something does not have a parent name, turn smart edit off, and add "parentname" "NAME" to the entity. (Or you can use a logic_auto to set the parent as soon as the level spawns.

When you make then a brush, you they will be on toggle for solidity, if you want to be able to toggle the state from solid to not solid, leave this alone. Otherwise, set it to Solid BSP (Or always solid, I forget what it is.)

Avatar
protoborg
288 Posts
Posted Mar 17, 2013
Replied 1 day later
The issue is that I want to rotate a large cube brush that has a laser emitter on each side. The idea is that you have to arrange all the laser emitters so that they align with the laser receivers on the walls, ceiling, and floor. I figure I can setup a Rubik's cube sort of thing. The player will have to rotate the inner cube until the laser emitters line up with the collectors. First, though, I obviously have to get the inner cube to rotate.
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 17, 2013
Replied 1 hour later

protoborg wrote:
The issue is that I want to rotate a large cube brush that has a laser emitter on each side. The idea is that you have to arrange all the laser emitters so that they align with the laser receivers on the walls, ceiling, and floor.

I figure I can setup a Rubik's cube sort of thing. The player will have to rotate the inner cube until the laser emitters line up with the collectors. First, though, I obviously have to get the inner cube to rotate.

I don't see the issue; parent the laser emitters to the rotator!

Well, it's not too hard to let it rotate; use a func_rotating or a func_door_rotating and parent the brushes and laser emitters to them.

Avatar
TopHATTwaffle
113 Posts
Posted Mar 17, 2013
Replied 2 minutes later
I think you may also need to disable the lasers when they are moving, and enable them once they are stopped. I could be wrong though.
Avatar
protoborg
288 Posts
Posted Mar 17, 2013
Replied 16 minutes later
Would it be possible to randomize the location of the 27 cubes that make up the inner cube? Make it more replay-able, ya know. I know there is a Rubik's cube map here on TWP, but that doesn't really help me.
Avatar
TopHATTwaffle
113 Posts
Posted Mar 18, 2013
Replied 19 minutes later
Yes there is. How I would do this, is just build it normally, then when the player is in the elevator (Or out of view), have all of the pieces randomly rotate and move about.
Avatar
protoborg
288 Posts
Posted Mar 18, 2013
Replied 35 minutes later
I could have the faces rotate 90 degrees in one direction. Each row or column would rotate in a different direction to "randomize" the combination of faces.
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 18, 2013
Replied 20 minutes later

protoborg wrote:
I could have the faces rotate 90 degrees in one direction. Each row or column would rotate in a different direction to "randomize" the combination of faces.

well, then use a logic_timer; a few logic_cases and shuffle your thing randomly :wink:

Avatar
protoborg
288 Posts
Posted Mar 18, 2013
Replied 1 hour later

Lpfreaky90 wrote:
protoborg wrote:

I could have the faces rotate 90 degrees in one direction. Each row or column would rotate in a different direction to "randomize" the combination of faces.

well, then use a logic_timer; a few logic_cases and shuffle your thing randomly :wink:

That could work nicely. Then when the player enters the room with the cube, they push a series of buttons to rotate the faces until they get the laser lined up correctly. The problem is how do I force the solution when the player gets frustrated? By that I mean how do I provide a "cheat" button that solves the cube for the player if need be?

If someone would be willing to help me with the logic of making this work, I will credit them in the final level somehow. The laser emitters are placed as follows:

http://steamcommunity.com/sharedfiles/f ... =132747733

http://steamcommunity.com/sharedfiles/f ... =132747822

I had another picture but I accidentally deleted it from the cloud. I hop these two are helpful in picturing the cube.

Avatar
Lpfreaky90
2,842 Posts
Posted Mar 18, 2013
Replied 1 hour later
I'd say the best way to add the cheat button is by writing a script for it.
Avatar
srs bsnss
552 Posts
Posted Mar 18, 2013
Replied 31 minutes later
Perhaps you could have a separate set of rotating entities that are activated by the cheat button, that only rotate to the correct position, and have the cheat button Kill the original rotating entities.

Monitoring the laser's direction could be difficult, though.

But maybe some logic branches and invisible laser catchers point_laser_targets could do the trick?
You could have outputs to change the travel distance of the second set of rotating entities. Maybe.

Just throwing out ideas :lol:

Advertisement
Registered users don’t see ads! Register now!
Avatar
Naulziator
104 Posts
Posted Mar 19, 2013
Replied 1 day later

TopHATTwaffle wrote:
I think you may also need to disable the lasers when they are moving, and enable them once they are stopped. I could be wrong though.

There is no need for that. The lasers move with the emitters while active, although in a bit of a jittery manner. I've tried a track_train & a func_rotate to use as parents (on separate occasions) and both work dandy enough. Just be sure to make the emitters stop moving if you need them to keep focus on a catcher when they connect.

Make sure to use the Auto Aim option when trying this. It'll keep the jittery motion from interfering with the alignment.