0 Members and 1 Guest are viewing this topic.
function Distance(X1,Y1,X2,Y2):Single;
You can check if he's in a certain distance from a point (that is your saved waypoint). In your case I'd stick with Code: [Select]function Distance(X1,Y1,X2,Y2):Single;
Quote from: DarkCrusade on September 29, 2010, 12:38:41 amYou can check if he's in a certain distance from a point (that is your saved waypoint). In your case I'd stick with Code: [Select]function Distance(X1,Y1,X2,Y2):Single;PerroRace uses angles to check whether players passed the point during last second(at least the version I have). Don't know what would you need that info for though, frosty.
constT=True;F=False;function CheckPlayerDist(ID:Byte;X,Y,Distance:Integer):Boolean;var Dist:Single;begin if RayCast(GetPlayerStat(ID,'x'),GetPlayerstat(ID,'y'),X,Y,Dist,Distance) then Result:=T;end;
Did you expect that now I'm going to ask why would you need checkpoint check via sight?
its seeing everyone through polys, not what i want
i'll just write that RayCast is very, very buggy function
Besides that it'll fail when you already passed the checkpoint and there's a poly in beetween you and the point...