cube needs to stay parallel to the ground.
Quote from Lpfreaky90 on November 13, 2011, 5:10 amHey,
for a level I am currently working on I need to make a cube so that it can move in the xy plane, and in height, but it shouldn't move in the xz or yz plane. So in other terms: it should be parallel to the floor, but I should be able to move it up.
any idea's?
~Lp
Hey,
for a level I am currently working on I need to make a cube so that it can move in the xy plane, and in height, but it shouldn't move in the xz or yz plane. So in other terms: it should be parallel to the floor, but I should be able to move it up.
any idea's?
~Lp
Quote from Spam Nugget on November 13, 2011, 5:41 amInvisible walls? im afraid i cant give you any help other that that without knowing more details.
Invisible walls? im afraid i cant give you any help other that that without knowing more details.

I think in terms of boolean variables. Generally, it makes things easier.
Quote from Lpfreaky90 on November 13, 2011, 6:42 ammore information:
The level is a map with multiple colored lasers. Because this is impossible I made various copies of the level, but say 1000px higher. The copy is what I call the "shadow" level. I have a shadow level for red, green and blue.Each shadow level represents a color, and the result of the shadow map is then used in the "real" map. Which uses colored env_lasers.
The cube in the shadow level is parented to the real level, so that if you move/aim your cube in the real level, it does the same in the shadow level, which can process stuff.
The problem with the cube tripping over is that the "shadow" are normal laser cubes/reflectors thus they can influence the others when they somehow come in the wrong shadow level. So if a cube trips over say the "blue shadow cube" can go into the green shadow level, and doing things there, thus breaking the map.
To make it even harder for myself I thought It would be fun if the level has multiple floors. So you have to be able to walk up a staircase, but you cube is not allowed to trip over.
I hope that was somewhat helpful!
more information:
The level is a map with multiple colored lasers. Because this is impossible I made various copies of the level, but say 1000px higher. The copy is what I call the "shadow" level. I have a shadow level for red, green and blue.
Each shadow level represents a color, and the result of the shadow map is then used in the "real" map. Which uses colored env_lasers.
The cube in the shadow level is parented to the real level, so that if you move/aim your cube in the real level, it does the same in the shadow level, which can process stuff.
The problem with the cube tripping over is that the "shadow" are normal laser cubes/reflectors thus they can influence the others when they somehow come in the wrong shadow level. So if a cube trips over say the "blue shadow cube" can go into the green shadow level, and doing things there, thus breaking the map.
To make it even harder for myself I thought It would be fun if the level has multiple floors. So you have to be able to walk up a staircase, but you cube is not allowed to trip over.
I hope that was somewhat helpful!
Quote from bruzag on November 13, 2011, 10:51 amnow im sort of retarded, and never mapped before, but how about walls that lasers can not pass trough in between each of your shadow levels? - that way you can have the lasers tip over without any effect
now im sort of retarded, and never mapped before, but how about walls that lasers can not pass trough in between each of your shadow levels? - that way you can have the lasers tip over without any effect
Quote from spongylover123 on November 13, 2011, 11:14 amI don't think this has been used in portal 2 before,
Thysterectomy your cube to a phys_slideconstraInt
I don't think this has been used in portal 2 before,
Thysterectomy your cube to a phys_slideconstraInt
Quote from Lpfreaky90 on November 13, 2011, 12:20 pmbruzag wrote:now im sort of retarded, and never mapped before, but how about walls that lasers can not pass trough in between each of your shadow levels? - that way you can have the lasers tip over without any effectthat won't work because the distance needs to be exactly the same all the time, if I would allow cubes to stay on a place they will lose their position relative to the cube, so that the puzzle is broken
spongylover123 wrote:I don't think this has been used in portal 2 before,
Thysterectomy your cube to a phys_slideconstraIntI don't think that's gonna work, because I still need to move to object freely in the xy-plane, what I could do is create some sort of elevator for the cube, but that limits my level design possibilities so I'd rather not do that...
What do you think of an onpickup phys_keepupright disable, ondrop phys_keepupright enable?
that might work?~Lp
that won't work because the distance needs to be exactly the same all the time, if I would allow cubes to stay on a place they will lose their position relative to the cube, so that the puzzle is broken
Thysterectomy your cube to a phys_slideconstraInt
I don't think that's gonna work, because I still need to move to object freely in the xy-plane, what I could do is create some sort of elevator for the cube, but that limits my level design possibilities so I'd rather not do that...
What do you think of an onpickup phys_keepupright disable, ondrop phys_keepupright enable?
that might work?
~Lp
Quote from Skotty on November 13, 2011, 12:22 pmphys_keepupright is exactly what you need. It keeps the cube all the time parallel to the ground but you can move it in any direction.
phys_keepupright is exactly what you need. It keeps the cube all the time parallel to the ground but you can move it in any direction.
Quote from Rand0mNumbers on November 13, 2011, 2:30 pmIs something like this what you are looking for?
ScpfgaKb1fkAlso, are the shadow levels identical to the actual level?
If so, logic_measure_movement is probably what you'll need. There was a script that added proper collisions to the shadowed cube, but I need to find it again.
Is something like this what you are looking for?
ScpfgaKb1fk
Also, are the shadow levels identical to the actual level?
If so, logic_measure_movement is probably what you'll need. There was a script that added proper collisions to the shadowed cube, but I need to find it again.
Quote from Lpfreaky90 on November 13, 2011, 4:17 pmRand0mNumbers wrote:Is something like this what you are looking for?
*youtube*Also, are the shadow levels identical to the actual level?
If so, logic_measure_movement is probably what you'll need. There was a script that added proper collisions to the shadowed cube, but I need to find it again.
I'm not sure what I'm looking at
The shadow level is almost identical. That way I can copy the behavior of the lasers to the real level.
*youtube*
Also, are the shadow levels identical to the actual level?
If so, logic_measure_movement is probably what you'll need. There was a script that added proper collisions to the shadowed cube, but I need to find it again.
I'm not sure what I'm looking at ![]()
The shadow level is almost identical. That way I can copy the behavior of the lasers to the real level.
Quote from Lpfreaky90 on November 13, 2011, 4:18 pmSkotty wrote:phys_keepupright is exactly what you need. It keeps the cube all the time parallel to the ground but you can move it in any direction.w00t
=====
Another question: is there an easy way to spawn prefabs/instances (a series of objects, linked to each other) with the press of a button? Like spawning a cube with a phys_keepupright?
w00t ![]()
=====
Another question: is there an easy way to spawn prefabs/instances (a series of objects, linked to each other) with the press of a button? Like spawning a cube with a phys_keepupright? ![]()

