Hello all,
I'm looking for tutorials how to do: sprite walking on other some sprites...
Question 2 is: What is the code for sprite to scrolling... Example: Cat runing on 2 sprites with x=480 each but he can't run on other sprite because no code...
Offline
When you say sprite walking on other sprites do you mean having a "background" sprite and a character sprite and having the character running across the background?
Basic Tutorial on how to do it
A good example
When adding in a character you simply don't move the characters x position, just simply change the "scroll" variable to make it appear that the character is moving along the background
Hope that helps in some way
Offline
For walking on a sprite, you should have a sensor color at the bottom of the sprite that is doing the walking. Then have a script that says
The script is like this:
If color {Sensor color} is touching color {terrain color}
Set {"A variable you will use for velocity Y, call it what you like"} to 0.15
Change {VelocityY} by -0.15
Change {Y} by {VelocityY}
If {key Right arrow} is pressed
Change {X} by {"whatever you want your speed to be, Positive"}
If {Key left arrow} is pressed
Change {X} by {"Whatever you want your speed to be, negative"}
The script will look something like that, there are also ways to add velocity to going left and right, and that makes it go faster the longer you push the button, and slow down when you stop pushing the button. Hope this helps!
Last edited by XplodingEggs (2010-12-18 15:00:43)
Offline