Please or Register to create posts and topics.

Rotating Room?

Page 1 of 4Next

would it be possible to have a room that rotates when the player presses the arrow key (on the keyboard) in that direction? how hard would this be to create? is it even possible?

Look into the game_ui entity, it allows keyboard commands to provide outputs to other entities.

Check out the Source Chariots source and/or Vehicle Base at my site, it has a good "starter package".

EDIT
It should be noted that game_ui only tracks the Forward, Backward, Strafe Left, Strafe Right, Primary Fire, and Secondary Fire inputs, irregardless of what key the player has them bound to. The Developer wiki should have a ton of information on it I think, and if someone wants to link to the Vehicle Base on there I'd be appreciative.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

ok, i looked at game_ui, but that only has outputs related to pressing the move keys (WASD). I want it to rotate when they press the arrow keys(keys that by default do nothing). also, from what i can see, it only works if you are looking at the entity.

also, how would i even get the room to rotate?

No it doesn't matter if you are looking at the entity, you have to Enable it via a trigger and/or another I/O.

As I said in my edit, you can only use the keys currently bound to the movement and firing keys.

Look at Vehicle Base, you need to use some logic_compares to figure out if 1.) the player is pressing a key you want, and 2.) if you want to do anything. You could use a momentary_rot button to make the room rotate only partially based on what the player does.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

ok, thx ill look at those entities

I am trying to rotate the room by having one wall be a momentary_rot_button, and it should rotate from a trigger_once (just to test it for now). all the other walls have the rotating wall as a parent. i am having two problems:

1. it crashes the game when i try to run it, and it gives me some weird error about a brush not being precached. it might be because of problem 2

2. I dont know what to put in the "via this input" in the output from the trigger. i put setPosition with a parameter override of 1, that may be why it crashed

What? Why don't you make the entire room just one entity? You don't need to make a parent chain.

Also, you have the room enclosed by another, hollow box made of world brushes right? As in, your map doesn't leak, correct?

Try using func_rot_button instead, it will probably do what you want better now that I think about it.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

"What? Why don't you make the entire room just one entity?"

as in, name them all the same name and have the same entity type? wouldnt that be too complicated? (with the x and y axis rotating)

ill try this, though.

and no, i was dumb and did not have it enclosed. ill do that

No, I mean make the entire room - all of the brushes - one entity.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

what? how do you do that?

edit: also, if i do it this way, will it work for complicated rooms, too (with platforms sticking out of the wall, for example)?

edit: also, game_ui is not working to rotate the walls at all. activate on touch is working, though

Page 1 of 4Next