Prevent Cube Pickup

Prevent Cube Pickup

Postby Sindarin » Wed Oct 31, 2018 5:06 pm

I've started to use the Hammer editor only recently, and it might be that I've simply overlooked this feature. However, I couldn't find it anywhere online, so I thought I'd ask here. My question is: Is there any way to prevent players from picking up cubes?

Further Explanation:
In my map, a cube is dropped and should be pushed by a robot arm. This blocks a laser, allowing the player to pass to the exit. Currently, the player doesn't have to activate the robot arm, because they could just pick up the cube and move it in front of the laser themselves. Is there any way to prevent the player from simply picking up the cube, and make it so only the robotic arm can move it?

Thank you in advance
Sindarin
I was told I would get $60 if I posted on the forum
 
Posts: 3
Joined: Oct 31, 2018

Registered users don't see ads! Register now!
 

Re: Prevent Cube Pickup

Postby ChickenMobile » Thu Nov 01, 2018 7:36 pm

I would suggest you change the layout of the map to account for the player not being able to block the laser with the cube. e.g. the laser is too high to be blocked or behind a fizzler and needs the mechanical arm to lift over it etc.

Physically stopping the player from doing something they should be able to only frustrates them. e.g. invisible walls
                             TWP Releases | My Workshop
User avatar
ChickenMobile
Senior Stalemate Associate
 
Posts: 2,429
Joined: May 9, 2011
Location: Canberra, Australia

Re: Prevent Cube Pickup

Postby TeamSpen210 » Fri Nov 02, 2018 2:26 am

You could also build a glass/grating box around the cube, which is attached to the panel. You can block pickup though - fire a DisablePickup input to the cube.
User avatar
TeamSpen210
Community Contributor
 
Posts: 542
Joined: Jul 2, 2013

Re: Prevent Cube Pickup

Postby Sindarin » Sat Nov 03, 2018 8:00 am

@TeamSpen210 - DisablePickup was exactly what I was looking for. Apparently Hammer does not know about that command applying to cubes, but it works very well. The other solutions work too, but this works best in my case. Thank you!
Sindarin
I was told I would get $60 if I posted on the forum
 
Posts: 3
Joined: Oct 31, 2018

Re: Prevent Cube Pickup

Postby DaMaGepy » Wed Nov 07, 2018 12:24 pm

Cubes should be picked up normally, if not then it breaks the learned mechanics, unless you scale it up (bigger size) or re-texture to have an anvil or dumbbell icon in the middle.
If the cube is pickable it also means its pushable so preventing pickup cant really solve the problem, unless its impossible to block the laser just by pushing it around or using portals or other mechanics. Maybe you can make your own cube, change its weight or put a parented trigger around it so if player enters it it "stopmotion" or such, if leaves then enables (if tweaking weight makes it onmovable by the arm)
-= Check out my maps: workshop, and their .vmf sources: homepage =-
User avatar
DaMaGepy
Community Contributor
 
Posts: 381
Joined: Oct 26, 2007
Location: Hungary

Re: Prevent Cube Pickup

Postby Sindarin » Wed Nov 07, 2018 6:08 pm

In my case pushing is not a big problem. This particular puzzle is more to show a friend what can be done with the Hammer editor for a certain project. Indeed, pushing was a problem right now but honestly it doesn't matter too much. Later when we're going to use this for real I'll remember your advice.
Sindarin
I was told I would get $60 if I posted on the forum
 
Posts: 3
Joined: Oct 31, 2018


Return to Hammer and Modding



Who is online

Users browsing this forum: No registered users and 3 guests