Parenting to Player
Quote from Lpfreaky90 on December 17, 2011, 11:48 pmchickenmobile 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][/spoiler]
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.
Refer to this picture:
picture

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.
Quote from Brainstatic on December 18, 2011, 1:56 pmchickenmobile 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][/spoiler]
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?
Refer to this picture:
picture

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?

Quote from ChickenMobile on December 18, 2011, 9:27 pmLast 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:
- 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
tpToPlayer.zip
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:
- 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
Quote from Brainstatic on December 18, 2011, 11:19 pmchickenmobile wrote:How about I make it easier for you by giving you the example I madeThank you very much!

Thank you very much!