oh yeah, i also want iron sights in the script
and 1 2 3 4 5 etc as select weapons
i need a step by step tut!
PLEASE!!! I NEED ONE!!!!!!!!!!!!!!!!!!!1
Code: Select all
{
Spawn[ ()
{
Console(true); //Turns on debug
Gravity(false); //No grav
SetNoCollision(); //No coll
HideFromRadar(true);
BoxWidth(0);
BoxHeight(20);
LowLevel("Setup");
} ]
Setup[ ()
{
PositionToPawn("player",0,0+0+25*sin(-self.camera_pitch),25*cos(self.camera_pitch),true,false);
self.ideal_pitch = self.camera_pitch;
self.ideal_yaw = self.player_yaw;
ChangeYaw();
ChangePitch();
PawnRender(false);
self.ThinkTime = 0;
if(self.lbutton_pressed)
{
SetTargetPoint(500 + random(-100,100),1000 + random(-100,100),0);
FireProjectile("rifle_shell", "BIP01", 25, 25, 25, "enemy_health");
}
} ]
}Code: Select all
PositionToPawn("player",0,0+0+25*sin(-self.camera_pitch),25*cos(self.camera_pitch),true,false);Code: Select all
SetTargetPoint(500 + random(-100,100),1000 + random(-100,100),0);Code: Select all
{
Spawn[ ()
{
Console(true); //Turns on debug
Gravity(false); //No grav
SetNoCollision(); //No coll
HideFromRadar(true);
BoxWidth(0);
BoxHeight(20);
LowLevel("Setup");
} ]
Setup[ ()
{
self.ThinkTime = 0.05;
PositionToPawn("Player",0,0+0+25*sin(-self.camera_pitch),25*cos(self.camera_pitch),true,false);
self.ideal_pitch = self.camera_pitch;
self.ideal_yaw = self.player_yaw;
ChangeYaw();
ChangePitch();
PawnRender(false);
if(self.lbutton_pressed) //SHOOT!!!!
{
PlaySound("weapon\modern\m16a2.wav",500);
self.ThinkTime = 0.05;
SetTargetPoint(0,0,25);
FireProjectile("rifle_shell", "BIP01", 25, 25, 25, "enemy_health");
}
} ]
}