3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Start Switchs and inputs with script  (Read 192 times)

« on: January 02, 2014, 11:07:33 PM »
Hey, im having some problems with a script. When i press R button (to reload) i start a script, in the script i wrote this:
Code: [Select]
int count = 0;
void Main()
{
      if (iKeyDown(iKeyCode("DIK_R"))){
      iObjectStop (OBJ_44);
     }
   if (count == 300); iObjectStart (OBJ_44);
   count++;
     }


The OBJ_44 is the shoot input, when i press R the input doesn't stop and you can keep shooting while you reload, and the same happens with the switch, i need start it after reload and nothing happens, the gun skinmesh is static. What can i do ???
See my web:
« Reply #1 on: January 03, 2014, 09:50:39 AM »
in the script above, the semi colon after if (count == 300)  should be removed...

the way you have it now, regardless of if the test works, it does nothing...

--Mike
Pages: [1]