Page 1 of 1

What is equal to TeleportEntity()

Posted: Sat Oct 01, 2016 1:35 pm
by velocity
I'm trying to push a client in a direction

What's equal to TeleportEntity(client, NULL_VECTOR, NULL_VECOTR, Velocity) in sourcepython?

Re: What is equal to TeleportEntity()

Posted: Sat Oct 01, 2016 1:37 pm
by satoon101

Re: What is equal to TeleportEntity()

Posted: Sat Oct 01, 2016 3:37 pm
by iPlayer

Syntax: Select all

from mathlib import Vector

...

player.teleport(velocity=Vector(1000, 0, 0))


It's also worth mentioning that you can use base_velocity to push the player:

Syntax: Select all

player.base_velocity = Vector(1000, 0, 0)


Setting base_velocity adds another vector to player's current velocity, while teleporting player sets player's velocity to that vector.

Re: What is equal to TeleportEntity()

Posted: Sun Oct 09, 2016 1:27 pm
by velocity
Thank you for an example!