here's my game: http://scratch.mit.edu/projects/finlayvscott/2999566
The problem is, how can I get it to update the xposition/yposition variables as it moves, because it mucks up the shooting. Please help!
Offline
when gf clicked forever set [xPosition v] to x position of [sprite 1 v] set [yPosition v] to y position of [sprite 1 v] endI hope i understood you right. I wasn't quite sure what you needed
Last edited by mmww (2012-12-23 11:23:17)
Offline
Well, you could just put in a new script for the guy, like:
when gf clicked forever set [xposition v] to (xposition) set [yposition v] to (yposition)Is that what you need? Hope it helps!
Offline
mmww wrote:
when gf clicked forever set [xPosition v] to ([x position v] of [sprite 1 v]) set [yPosition v] to ([y position v] of [sprite 1 v]) endI hope i understood you right. I wasn't quite sure what you needed
I think it's just the coordinates of the sprite itself.
Offline
powerpoint56 wrote:
mmww wrote:
when gf clicked forever set [xPosition v] to ([x position v] of [sprite 1 v]) set [yPosition v] to ([y position v] of [sprite 1 v]) endI hope i understood you right. I wasn't quite sure what you neededI think it's just the coordinates of the sprite itself.
Yes, but it depends on what sprite you put the script in. This would work for all sprites
Offline
mmww wrote:
powerpoint56 wrote:
mmww wrote:
when gf clicked forever set [xPosition v] to ([x position v] of [sprite 1 v]) set [yPosition v] to ([y position v] of [sprite 1 v]) endI hope i understood you right. I wasn't quite sure what you neededI think it's just the coordinates of the sprite itself.
Yes, but it depends on what sprite you put the script in. This would work for all sprites
Yes.
Offline