Kool
Nice game dude, can you help me with my coding? what code stops the user from being able to rotate the cannon all the way around? I need a similar code for a game im currently making. Please help!!
0 reviews are hidden due to your filters.
Kool
Nice game dude, can you help me with my coding? what code stops the user from being able to rotate the cannon all the way around? I need a similar code for a game im currently making. Please help!!
If you want the turret to stop rotating at a certain point, you have to place an if statement to your code. for example, you want the rotation to stop at 30 degree angle, then you must place:
if(rot > 30)
rot = 30;
So even if you pressed a button to rotate the turret, it will go up to 30 degrees only. "rot" is a variable, you use it to define the rotation of your movie clip. In my example:
turret._rotation = rot
Well, i hope this will help you
Age 37, Male
Student
Braintree College
Essex, England
Joined on 7/30/04