Tremulous Forum

Mods => Modding Center => Topic started by: infestor1 on May 10, 2009, 03:28:22 am

Title: teleport
Post by: infestor1 on May 10, 2009, 03:28:22 am
How would I create a command that would teleport the target to a predefined place in the map?

It would be used like this:

!base [USER] [TEAM]

It would teleport the user ([USER]) to their team's ([TEAM]) base.

I just need to know how to teleport a player to a position, and how to make it teleport the given player.

THANKS!
Title: Re: teleport
Post by: doublehex on May 10, 2009, 05:00:35 am
look at setviewpos command in src/game/g_cmds. c

pretty much just this line:   TeleportPlayer( ent, origin, angles );

ent is obviously the entity, origin is the x, y, z, angle is the orientation
Title: Re: teleport
Post by: infestor1 on May 10, 2009, 10:36:41 pm
Oh, thanks so much!

This worked well!

Thank you!