2017년 7월 25일 화요일

Sprites not following their code


Ive been having an issue with my program where i have 4 ships each with their own code and paths. however as soon as the gameplay screen starts the sprites just ignore the coding and move to the right and stay there and get stuck. What am i doing wrong?



--
please add a screenshot of your relevant blocks directly into this thread like this

-- 
In AlienWMove() and AlienMMove() procedures you are changing only the x coordinate of the of the imagesprite and you are not changing the y coordinate. x coordinate defines the position of imagesprite with respect to horizontal axis. So changing it will move the sprite horizontally. To make the sprite move vertically change the y coordinate.

-- 
okay what about the other two procdures? they also go to the right and stop when they reach the edge

-- 
See if you have set the Heading property in Designer view to zero and Speed to any number other than zero. If yes then the sprite moves to the right as the heading is zero (i.e zero degree above the positive x axis).Set the speed to zero and the sprite will not move to the right.

It might help if you take a look at the documentation about the properties of Imagesprite at :

-- 

댓글 없음:

댓글 쓰기