I'm on my pc now.
Quote: "But where does the
"cr# = Rotate_function( cr# )"
go?"
Yes in your case it is Cannon_down( cr# ) and it would go in the same place as the function call already. So instead of:
//Get Cannon Rotation
cr# = GetSpriteAngle( 2 )
if GetVirtualButtonPressed( 1 ) = 1
cannon_down ( cr# )
endif
SetSpriteAngle( 2, cr# )
You have this:
//Get Cannon Rotation
cr# = GetSpriteAngle( 2 )
if GetVirtualButtonPressed( 1 ) = 1
cr# = cannon_down ( cr# )
endif
SetSpriteAngle( 2, cr# )
Quote: "I also changed the local variable in my function to angle#
Would that change this:
"cr# = cannon_down( cr# )"
in any way?
"
Nope. Functions are small programs and any local variable created inside one can only be accessed by that function inside that function. So you could technically have 10 functions all with the same local variables and they wouldn't interfer with one another.
Quote: "Also, thanks for helping. I've only been using this program for some hours"
No problem, that's what I'm here for.