Object's Angles

Avatar
spongylover123
944 Posts
Posted Jan 29, 2012
I'm trying to make a map that doesn't let players to rotate the redirection cube by standing on it and then crouching to the side to make it point the laser up.
So I made a script function

function ChangeAngles(target, source) {
objtarget:SetAngles(0, 0, 0)

Somehow, I cant get it to work.
Dont ask me to the setang command in the console, it seems to alter the player's angles too when carrying the cube.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Lpfreaky90
2,842 Posts
Posted Jan 29, 2012
Replied 14 minutes later
what about parenting it to a phys_keepupright?
Avatar
spongylover123
944 Posts
Posted Jan 29, 2012
Replied 54 minutes later

lpfreaky90 wrote:
what about parenting it to a phys_keepupright?

Doesnt work. It seems to not cooperate with prop_weighted_cube.

Avatar
ChickenMobile
2,460 Posts
Posted Jan 29, 2012
Replied 8 hours later

spongylover123 wrote:
I'm trying to make a map that doesn't let players to rotate the redirection cube by standing on it and then crouching to the side to make it point the laser up.

Why is it so important to do this? I know most people don't even try doing that.

Avatar
spongylover123
944 Posts
Posted Jan 29, 2012
Replied 8 minutes later

chickenmobile wrote:
spongylover123 wrote:

I'm trying to make a map that doesn't let players to rotate the redirection cube by standing on it and then crouching to the side to make it point the laser up.

Why is it so important to do this? I know most people don't even try doing that.

People will do that if there are laset catchers on the ceiling.
im making a machine out of hammer's i/o to change the angle of the cube. Reason why I made that script.

Avatar
ChickenMobile
2,460 Posts
Posted Jan 29, 2012
Replied 3 minutes later
if that's the case, you could always move the receptacle so the laser cannot point straight up.
Avatar
spongylover123
944 Posts
Posted Jan 30, 2012
Replied 54 minutes later

chickenmobile wrote:
if that's the case, you could always move the receptacle so the laser cannot point straight up.

yes, but if I do that, i cant redirect the laser to the ceiling.
This is what im trying to do.
A laser is on the left wall, the player needs to redirect the laser to the ceiling, to do that the player needs to change the angle of the cube using the angle changer. then the player needs to point the laser down to thr catcher.
Hope this explains more.

Avatar
josepezdj
2,386 Posts
Posted Feb 01, 2012
Replied 2 days later

spongylover123 wrote:
This is what im trying to do.
A laser is on the left wall, the player needs to redirect the laser to the ceiling, to do that the player needs to change the angle of the cube using the angle changer. then the player needs to point the laser down to thr catcher.
Hope this explains more.

Let me know if I got it: you are making a machine (the cube angler machine) that will change an existing reflector cube direction, right? How does that machine look like? is it the reflector cube free so the player can change its direction freely? You could simply trap the cube in a grilled cage so the player cannot manipulate the cube.

Another option would be to set certain floor parts fizzling for the cube onTouch and the player won't be able to put the cube right below the laser catcher...

Anyway, I still think I didn't really get your meaning...

Avatar
spongylover123
944 Posts
Posted Feb 01, 2012
Replied 9 hours later

josepezdj wrote:
Let me know if I got it: you are making a machine (the cube angler machine) that will change an existing reflector cube direction, right? How does that machine look like? is it the reflector cube free so the player can change its direction freely? You could simply trap the cube in a grilled cage so the player cannot manipulate the cube.

Another option would be to set certain floor parts fizzling for the cube onTouch and the player won't be able to put the cube right below the laser catcher...

Anyway, I still think I didn't really get your meaning...

The player needs the cube anyway, so if the cube's angle is changed, it will still be fizzled, and, the machine is just a plate with a particle and a prop_satic laser cathcer, with alot of logic relays, and the angle will change when the arrow keys are pressed.

Images 1
Post image 1
Avatar
josepezdj
2,386 Posts
Posted Feb 02, 2012
Replied 9 hours later
OK, clearer.

I guess all you need is to fizzle the cube on(player)Touch by surrouding the cube with a trigger brush and adding the output "onTouch">"dissolve". This will prevent the player from moving the cube by any other means than the angler machine... But this way you'll have to set a fixed position for the cube and make respawn right on that position everytime... Or build a cage around it...

Avatar
chimera201
129 Posts
Posted Feb 02, 2012
Replied 25 minutes later
Maybe you are trying to make something that is similar to a new element(cube holder) in Rexaura. Ask Mevious
Avatar
spongylover123
944 Posts
Posted Feb 02, 2012
Replied 3 hours later
@josepezdj
I'll try that,but if it doesnt work or loocks weird, I'll scrape it.

@chimera201
I think Mevious use the output "DisableMotion"
I dont think Portal supports .nut scripting.

Avatar
spongylover123
944 Posts
Posted Feb 03, 2012
Replied 1 day later
Double posting because of update
of my map,

well it works, but many of my friends who playtested this say its wierd if the cube's get fizzled if the throw it or if they stand on it.

Avatar
josepezdj
2,386 Posts
Posted Feb 03, 2012
Replied 23 minutes later
Hey spongylover123,

I think it won't be weird if you put some sign around warning about it... like that one of the companion cube grabbed by the player, with the heart broken above...

Or any signage with a cube and another overlay with an "X" on it saying "don't..."

Avatar
spongylover123
944 Posts
Posted Feb 03, 2012
Replied 10 hours later
That solves the "not allowed to rotate the cube part",
but doesnt solve script function of changing the cube's angles.
Avatar
josepezdj
2,386 Posts
Posted Feb 04, 2012
Replied 3 hours later
I think the easiest way would be to use func_door_rotatings or move_linears tied to the cube... and forget about scripting.

Give it a try.

Advertisement
Registered users don’t see ads! Register now!
Avatar
spongylover123
944 Posts
Posted Feb 04, 2012
Replied 10 hours later
the func_door_rotating and linears are really complicated if you have 6 angles. Scripting seems much easier to do