[Solved] Player Target / Parent Player
I would also like to know how to parent things to a player.
I'm also trying to do this for a co-op map.
EDIT
ok i figured out how to parent something to Chell. So I parented the info_target, and that seems to be working well. I just set the parent of the info_target in an logic_auto with the parameter of !player
Now i need to figure out how to do it in co_op
So what I need to know now is how to parent a info_target onto Atlas and P-Body
You can also use scripting to do the same thing.
An info target with a script in it:
local variable = playername.getOrigin()
self.setOrigin(variable)
EntFire("nameoftarget", "setParent", "playername", 0.0)
// Note: this may not work seeing as setOrigin needs 3 values not a vector position. Perhaps you can do it like this:
self.setOrigin(variable.x, variable.y, variable.z)
Honeslty I don't know why you just set the target for the catapult to !pvsplayer (this is the first player in a radius around the entity). VDC targetnames
chickenmobile wrote:
Honeslty I don't know why you just set the target for the catapult to !pvsplayer (this is the first player in a radius around the entity). VDC targetnames
This wouldn't work for what I'm trying to do in coop, I was just testing it in sp. I was trying Orange and Blue, but it didn't seem to work. I'll give it another shot and check out the scripting as well.
Edit
Seeing how I couldn't get Orange or Blue to work still... I just spawned each player in their own trigger with the info_target in the middle of them. Set the trigger to parent the info_target with a parameter of !activator.
EDIT: I am sorry, I made a mistake in the last post: the orange bot is referenced as 'red' seeing as Valve probably re-used TF2 code to make Portal 2 coop.
EDIT2: !pvsplayer doesn't work (it only fires at blue). Must be strictly other valve multiplayer games.
. I hate it when simple little tiny itty bitty teeny wheeny things cause me so much pain.Thanks.