Please or Register to create posts and topics.

Parenting to Player

PreviousPage 2 of 2
chickenmobile wrote:
A point_teleport teleports an object to a certain spot (i.e. to an info_target) from an output. I don't see why you would need to parent the point_teleport whatsoever.

Refer to this picture:
picture

Spoiler
Image

The problem is that I want an ontrigger -> object teleport to player. That is why there is something that has to be target to the player, since the point where the object has to teleport is different.

chickenmobile wrote:
A point_teleport teleports an object to a certain spot (i.e. to an info_target) from an output. I don't see why you would need to parent the point_teleport whatsoever.

Refer to this picture:
picture

Spoiler
Image

You should start a site with Hammer tutorials all in picture form like that. But I just tested a point_teleport, and I could not get it to teleport any entities to any location other than that of the point_teleport.

The Teleport input teleports the entity to teleport (the one in the keyvalues) to the location of the point_teleport.
The TeleportToCurrentPos input seems to do the same thing.
The TeleportEntity input, the only of these three that has a parameter, teleports the entity that is placed in the parameter override to the location of the point_teleport.

Specifically, how would I use a point_teleport to teleport an entity to a mobile position?

Try out Twin Pillars, a Portal 2 map by BOB74j.

Last night I wrote a whole paragraph that seemed to not have posted... anyway...

I was going to say it would be better to actually use scripting instead of a point_teleport in order to teleport the info_target to the player then parent it. Insert entity scripts inside your info_target which you want the object to teleport to and then on an output, make it activate the script which will parent the info_target to the player, like so:

ImageImage

Code: Select all
function TeleportToPlayer()
{
   self.SetOrigin(player.GetCenter())
   EntFire( self.GetName(), "SetParent", "!player", 0, 0)
}

How about I make it easier for you by giving you the example I made :P

tpToPlayer.zip
?????????????????????????????TWP Releases | My Workshop
chickenmobile wrote:
How about I make it easier for you by giving you the example I made :P

Thank you very much! :notworthy:

Try out Twin Pillars, a Portal 2 map by BOB74j.
PreviousPage 2 of 2