@Codeabin I really don’t need the sprites, I have 2 different sprites there and I can see them flipping as I press on the right and left arrows. You may need to change walkTimer=2 at the top of your code and also at the end of the touched() function.
Dave try them please.
Images are different conpare the legs
Ok dave i got it to work it was because it was switching to fast for the eye to see.
Is there a way to make the sprite point left, instead of adding a whole new walk event for the left arrow
Use a shader to flip the image.
I have no clue what you mean
@Codeabin You need 2 sets of sprites. On going right and one going left and you need to use the correct set. No shortcuts.
Or use a variable set as a the positive width, then the event changes that into a negative width
Its in what I showed you on Skype
Dave is it possible to flip those images for me im not near a computer right now.
@Codeabin, here is an example of what CodeaNoob meant:
function draw()
-- This sets a dark background color
background(40, 40, 50)
sprite("Documents:space",WIDTH/2,HEIGHT/2,1024,768)
--sprite("Dropbox:Ship",WIDTH/2,HEIGHT/2,2800,526)
sprite("Documents:earth",WIDTH/2,-225,1750,1050)
sprite("Dropbox:Ship",WIDTH/2,HEIGHT/2,2800,415)
-- sprite draw
local w, h = char.width, char.height
if walk2 then
w = -char.width
end
sprite(char,charP.x,charP.y, w, h)
sprite(arrow,arrowP.x,arrowP.y)
sprite(arrow2,arrow2P.x,arrow2P.y)
-- walk left/right setup
if walk==true then
charP.x=charP.x + 1
end
if walk2==true then
charP.x=charP.x - 1
end
-------------------------
if walkAnimation==true then
walkTimer=walkTimer + 0.1
end
if walkTimer > 1 then
char=readImage("Planet Cute:Character Horn Girl")
end
if walkTimer > 2 then
char=readImage("Planet Cute:Character Princess Girl")
end
if walkTimer > 2 then
walkTimer=1
end
-- Do your drawing here
end
Update: thanks to @dave, @jakattak and codeanoob
https://www.dropbox.com/s/5kcuvz2h8eziw7o/Video%201-27-2014%2C%209%2006%2010%20PM.mp4
Just something I thought, Why not put the move right button on the right side of the screen?
I need helpers badly, so if your willing to help write code tell me.
Update:
Alien ship on mainmenu
Video,
https://www.dropbox.com/s/y9x7ax0u8ytcgca/Video%201-28-2014%2C%201%2033%2016%20PM.mp4