im making a game where the enemies move in from the left side of the screen and when they get to a certain point they fire a laser at the player but i cant get the enemies to fire here is my code
void enemyFire()
{
if( dbObjectPositionX( enemy1 ) == 350 )
{
dbMakeObjectBox( 5, 24, 10, 5 );
dbColorObject( 5, dbRGB( 0, 255, 0 ));
dbPositionObject( 5, dbObjectPositionX(enemy1), dbObjectPositionY(enemy1), 0 );
}
dbPositionObject( 5, dbObjectPositionX(5) - 10, dbObjectPositionY(5), 0 );
}
edit: nevermind i figured it out