ID: Player ID to which the speedbonus shall be given
VectorX,VectorY: Direction of the speedbonus. Use GetPlayerStat(ID,'VelX') and VelY here as default.
Put a minus infront of both such GetPlayerStat to create a slowing effect.
speed: Strength of the speedbonus. This is an appropriate value and not absolute.
A negative speed value will make the AddSpeed procedure have no effect.
lol
lol
This user was warned for this post
Can anyone post this script again plz?
or files?
procedure AddSpeed(const ID,owner: byte; VectorX,VectorY,speed: single);
var X,Y,add: single;
begin
If (VectorX <> 0) or (VectorY <> 0) then begin
X:=VectorX/sqrt(VectorX*VectorX + VectorY*VectorY);
Y:=VectorY/sqrt(VectorX*VectorX + VectorY*VectorY);
add:=20 + speed;
CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y,X * speed,Y * speed,0,11,owner);
CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X + Y * 3,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y + X * 2,X * speed,Y * speed,0,11,owner);
CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X + Y * 6,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y + X * 4,X * speed,Y * speed,0,11,owner);
CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X + Y * 9,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y + X * 4,X * speed,Y * speed,0,11,owner);
CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X - Y * 3,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y - X * 2,X * speed,Y * speed,0,11,owner);
CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X - Y * 6,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y - X * 4,X * speed,Y * speed,0,11,owner);
CreateBullet(GetPlayerStat(ID,'X') + GetPlayerStat(ID,'VelX') * 5 - add * X - Y * 9,GetPlayerStat(ID,'Y') + GetPlayerStat(ID,'VelY') * 5 - add * Y - X * 4,X * speed,Y * speed,0,11,owner);
end;
end;