• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows please help!

N

nuhlon

Guest
i was making a game and there was a problem with my begin step code, i dont know whats wrong with it.


if (hp <= 0)
{
with (instance_create_layer(x,y,layer,oDead))
{
direction = other.hitfrom;
hsp = lengthdir_x(3,direction);
vsp = lengthdir_y(3,direction)-2;
if (sign(hsp != 0) image_xscale = sign(hsp); <---- problem
}

instance_destroy();
}
 
Code:
if (sign(hsp != 0) image_xscale = sign(hsp)
You've missed a closing ) on the first sign function, it should be sign(hsp), not sign(hsp
 
Top