Pages: 1
Topic closed
I need help comeing up with a code to use lists to record the position of an object while in scrolling. I need it for the enemys in a mario kart game if that clarifies anything. Please help!
Offline
Give your sprites an xpostion variable and a yposition variable
Record the values of these variables and move them move like this
go to x:xposition+scrollX y:yposition+scrollY
Offline
Zelda123 wrote:
Do you mean like this:
http://scratch.mit.edu/projects/Zelda123/266182
NOt quite. What I want is if yourare that one cat and then when you press the down key, another cat pops up and does the replay.
Offline
Anyone? Archmage, how would I get those positions in the first place?
Offline
TheSaint wrote:
Anyone? Archmage, how would I get those positions in the first place?
Just move the karts your self and record it.
The essential part is how you move the karts.
Move your cars with the code above. My ghost driver project is a good example of this.
Offline
TheSaint wrote:
Maybe I didn't explain it right or something because what you told doesn't work.
The scrolling starts at X 660 and Y -190. The kart postition on the screen never changes from X 4 Y 51. I cannot do it like you ghost driver because I use different sppeds and formulas if it bounces off walls or flies out into space. Is there any way to record the positions in the scroll and then replay them so it follows the exact course I first drove it in?
Ok, so your issue is that you want to record ghost karts but when you record the karts you want it to play back properly.
You can still use my ghost driver thing. Take a look at the code. All it does is record when buttons you press. Just replace your movements codes for the car with your own and record your buttons presses.
You can also do positions which works equally well.
Last edited by archmage (2009-01-06 15:19:52)
Offline
archmage wrote:
TheSaint wrote:
Maybe I didn't explain it right or something because what you told doesn't work.
The scrolling starts at X 660 and Y -190. The kart postition on the screen never changes from X 4 Y 51. I cannot do it like you ghost driver because I use different sppeds and formulas if it bounces off walls or flies out into space. Is there any way to record the positions in the scroll and then replay them so it follows the exact course I first drove it in?Ok, so your issue is that you want to record ghost karts but when you record the karts you want it to play back properly.
You can still use my ghost driver thing. Take a look at the code. All it does is record when buttons you press. Just replace your movements codes for the car with your own and record your buttons presses.
You can also do positions which works equally well.
Oops, I just got it working after I posted that. Thanks for all of the help!
Offline
TheSaint wrote:
Zelda123 wrote:
Do you mean like this:
http://scratch.mit.edu/projects/Zelda123/266182NOt quite. What I want is if yourare that one cat and then when you press the down key, another cat pops up and does the replay.
Like a ghost in time trial?
Offline
Lucario621 wrote:
TheSaint wrote:
Zelda123 wrote:
Do you mean like this:
http://scratch.mit.edu/projects/Zelda123/266182NOt quite. What I want is if yourare that one cat and then when you press the down key, another cat pops up and does the replay.
Like a ghost in time trial?
Actually yeah. I got it to work just abslutly fine on my computer and then what does it do? It doesn't work online! The menu system doesn't work. Anyways I will try to fix it and get it posted.
Offline
Topic closed
Pages: 1