Hey!
My game is a rocket ship that moves upwards, of the ground, and has to move direction between a lot of obstactles, using the arrow keys. I am using scrolling for this game as it looks a lot better like it!
The ship moves by changing the "scrollY" varible. When the scrollY varible moves, the Y co-ordinate of the sprite moves.
That works, but when I want the ship to change direction and carry on moving in the direction, it doesn't move it just continues moving upwards. Now you may be thinking, yea but just make it "move 10 spaces" or something like that. However, that doesn't work as then the Y co-ordinate of the ship increases, which will eventually move it off the screen.
My question is, How do I make it so that the ship still moves in a direction, but not move the y co-ordinates.
If that makes sense
~ Dan01
Offline
[blocks]<point in direction( [/blocks]
Offline
Dang. I dislike looking at projects (because of Lag and lack of Java. But sure, I'll see)
Offline
<say[ I think the problem is that when you turn the ship and press up, the ship can't <move( 10 )steps>, because it Changes <y position> as well as <x position>? Maybe You should look at a project like privateer... i looked at the script and it made me dizzy, but maybe you could understand it...
I wish I could <set[ My lack of knowledge in this type of scrolling ]effect to(0
Last edited by PokemonMaster64 (2008-06-27 15:20:12)
Offline
If I'm not mistaken, I just looked at it. Did you make a seperate script that says, whenver something is pressed, move 1 step? like:
[blocks]<point in direction( <direction>[/blocks]
[blocks]<move( 1 )steps>[/blocks]?
Offline
But that's the problem...
I don't want it to move 1 step, because then the y co-orindate will increases, eventually causing it off the screen.
I bascically want something that moves the ship in the direction, but doesn't change the y co-ordinate.
If you can? O_o.
~ Dan01
Offline
Dan01 wrote:
But that's the problem...
I don't want it to move 1 step, because then the y co-orindate will increases, eventually causing it off the screen.
I bascically want something that moves the ship in the direction, but doesn't change the y co-ordinate.
If you can? O_o.
~ Dan01
Easy, change the X instead of the Y
Offline
Dan01 wrote:
So i create something like this?
<when green flag clicked>
<forever if><key[right]pressed?>
<if> direction > 45
<else>
<point in direction( (( direction <+> 1 ))
<change x by( 1 )
<wait( 0.1 )secsc>
Ummm... not sure why blank blocks there, but yes. And maybe use velocity for realistic-ness.
Offline
Dan01 wrote:
Thanks! ^_^
You've actually made it better than I thought it would be
You're good. Lol.
Thanks again
~ Dan01
Wow. It worked? Cool. I just thought since you were changing your X but, wow!
Offline
Dan01 wrote:
Hehe.
I think that's all the problems fnished!
So the next time I talk to you, it will be showing you the finished game
~ Dan01
I hope you add a longer level !
Offline