Push a player to a given point
Posted: Sat Dec 02, 2017 8:13 am
Hey guys, I've been trying to recreate the old est_pushto effect but I got strange behavior.
This is what I tried:
The problem I encounter is, that the point I'm getting pushed to seems to stay the same most of the time, only changing for reasons unknown to me.
Maybe you guys have a better insight what I'm doing wrong. Thank you :)
This is what I tried:
Syntax: Select all
@ServerCommand('pushto')
def pushto(command):
userid = int(command[1])
x1 = float(command[2])
y1 = float(command[3])
z1 = float(command[4])
vec = Vector(x1,y1,z1)
player = Player(index_from_userid(userid))
player.set_property_vector('m_vecBaseVelocity', Vector(x1,y1,z1))
The problem I encounter is, that the point I'm getting pushed to seems to stay the same most of the time, only changing for reasons unknown to me.
Maybe you guys have a better insight what I'm doing wrong. Thank you :)