Hi
I made a Project that after contact the car with a rigidbody, my gun as skin mesh is shown. for fire and shoot bullets I wrote a script that disable work at start and work when the car contact with rigidbody, Now I want after finish the bullets, after contact again (the car with rigidbody) reset the bullet.
Please Guide Me.
this is my Project:
I made a Project that after contact the car with a rigidbody, my gun as skin mesh is shown. for fire and shoot bullets I wrote a script that disable work at start and work when the car contact with rigidbody, Now I want after finish the bullets, after contact again (the car with rigidbody) reset the bullet.
Please Guide Me.
Code: [Select]
int Bullet = 100;
void Main()
{
OUT_66 = Bullet; // valuePrint
if (iKeyDown(iKeyCode("DIK_SPACE")))
{
Bullet -= 1;
if (Bullet <= 0)
{
Bullet = 0;
iObjectHide (OBJ_22); // hide gun (as skin mesh)
}
}
}
this is my Project: