PSP Hacks - Forums
Go Back   PSP Hacks - Forums > Tech Talk > LUA Scripting

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2008, 10:40 PM
zeroxskater zeroxskater is offline
PSP Newbie
 
Join Date: Aug 2008
Posts: 1
zeroxskater User Has a Beginner Reputation
Default

hey everyone well im developing a game, and i need to redo a couple of things before i get to far into the game. the biggest thing is sprite animation.

i have been using a code that is a timer and when a timer his a certain time it changes the image but that takes up alot of code and is inefficient. i have been looking for tutorials on this but had no luck, so can someone point me in the right direction?
Reply With Quote
  #2  
Old 08-27-2008, 10:26 PM
lua scripter lua scripter is offline
PSP Newbie
 
Join Date: Aug 2008
Posts: 14
lua scripter User Has a Beginner Reputation
Default

Code:
blue = Color.new(0,0,255) 

player = Image.createEmpty(32,32)
player:clear(blue)

Player = { x = 30, y = 100 }

function movePlayer()
pad = Controls.read()
if pad:right() then
Player.y = Player.y + 5
end
if pad:left() then
Player.y = Player.y - 5
end
if pad:down() then
Player.x = Player.x + 5
end
if pad:up() then
Player.x = Player.x - 5
end
end


while true do 

screen:clear()

movePlayer()

screen:blit(Player.y,Player.x,player)

screen.waitVblankStart()
screen.flip()
end
if you want to get your won image you need this code at the top of this code were player=
heres the code
Code:
player=Image.load("were you image is located")
__________________


Email me your lua scripts ill fix them or help you fix them and Email you back on what you wanted :D
Reply With Quote
Reply

 



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:08 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©