Paint Gun / Parenting to Portal Gun

Avatar
FelixGriffin
2,680 Posts
Posted May 13, 2012
Hi everyone,

I'm working on a map using a special object, which is supposed to "attach" to the portal gun and stay in front of it, and use a game_ui to take over the portal gun attack buttons.

But I haven't figured out a way to make it move up and down as well: I tried SetParent !player, but that doesn't work. Now I'm working with a func_tank, but it lags and still doesn't move vertically.

I'd seen Omnicoder's paint gun instances, which did something like this, but it seems that they were lost with MyApertureLabs. Does anyone know where I could get a copy? (Or of another entity I could use instead of func_tank?)

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted May 13, 2012
Replied 31 minutes later
A func_tank is probably how they did it, however in order for the tank to be affected by the view of the player you need to make the player activate it (with the use key or through an output) and it needs to be in an appropriate place to be parented so it doesn't look unnatural.

I tried to do something similar to this by attaching a weapon_portalgun to one of the coop bots so each of their portals were linked... did not turn out well.

Motanum has a map where you have a 'holdable' paint gun: post68921.html#p68921
Perhaps you can ask permission to use it.

Avatar
msleeper
4,136 Posts
Admin
Posted May 14, 2012
Replied 17 hours later
If it were me, I'd use a laser cube and replace the model with something different. It always faces outward so hard to go wrong there.
Avatar
ChickenMobile
2,460 Posts
Posted May 14, 2012
Replied 1 hour later

msleeper wrote:
If it were me, I'd use a laser cube and replace the model with something different. It always faces outward so hard to go wrong there.

Question is... does it face the correct direction when you are not holding the cube and will it get in the way of anything?

Avatar
msleeper
4,136 Posts
Admin
Posted May 14, 2012
Replied 4 minutes later
I guess it depends on the mechanics of the puzzle. Disable it OnPickup to deal with the first problem.
Avatar
FelixGriffin
2,680 Posts
Posted May 14, 2012
Replied 5 hours later
I tried that, and it works the same as parenting to the player--it doesn't turn upwards or downwards. For my puzzle that's necessary. :sad:
Avatar
CamBen
973 Posts
Posted May 14, 2012
Replied 9 hours later
I had the same problem with my superphyscannon, rocket launcher, raygun, and freezegun. very frustrating.
Avatar
msleeper
4,136 Posts
Admin
Posted May 14, 2012
Replied 1 minutes later

FelixGriffin wrote:
it doesn't turn upwards or downwards. For my puzzle that's necessary. :sad:

Portals.

Avatar
spongylover123
944 Posts
Posted May 14, 2012
Replied 3 hours later
Maybe use the command sv_enableholdrotation
and use a prop_physics?
Avatar
Vordwann
767 Posts
Posted May 14, 2012
Replied 1 hour later
If you use a prop_physics you can set preferred carry angles, which means you can specify the angle it points when you are holding it. Then disable putting it down once you've picked it up, use some simple game_ui and item placement and you're golden. Cave Johnson, we're done here. Until someone makes another post.
Avatar
shielawin
1 Posts
Posted Jun 02, 2012
Replied 18 days later
as i viewed on all of the posts, this makes me interest as this contributes ideas to everyone who could possibly encounter the same problem.


Today I caught myself smiling with my dark ops knife for no reason. then I realized I was thinking about you

Avatar
Lpfreaky90
2,842 Posts
Posted Jun 02, 2012
Replied 37 minutes later

shielawin wrote:
as i viewed on all of the posts, this makes me interest as this contributes ideas to everyone who could possibly encounter the same problem.

I have absolutely no idea what you are trying to say here.

Avatar
CamBen
973 Posts
Posted Jun 02, 2012
Replied 11 hours later

lpfreaky90 wrote:
shielawin wrote:

as i viewed on all of the posts, this makes me interest as this contributes ideas to everyone who could possibly encounter the same problem.

I have absolutely no idea what you are trying to say here.

I think they are saying that they are a bot.

Avatar
RubbishyUsername
167 Posts
Posted Jun 06, 2012
Replied 3 days later

msleeper wrote:
FelixGriffin wrote:

it doesn't turn upwards or downwards. For my puzzle that's necessary. :sad:

Portals.

That is basically the only puzzle in ReepBlue's a little higher: making forward flying gel upward flying gel.

Avatar
inovative thinker
5 Posts
Posted Jun 13, 2012
Replied 7 days later
I figured out how to make this work. make a func_physbox in the shape of your gun with the following settings:
prop_data:small_metal
set preferred carry angles: 0, 0, 0
solid to world
FLAGS
Start alseep: on
Use preferrd carry angles: on
generate output on +USE: on
physgun can always pick up: on

some of these may be unnessicary, but it DOES work.

Advertisement
Registered users don’t see ads! Register now!
Avatar
radelite
121 Posts
Posted Sep 09, 2013
Replied 1 year later
Try a measure movement