![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on help with lua on numbers and probabilty within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Code: up = Image.load("up.png") down = Image.load("down.png") left = Image.load("left.png") right = Image.load("right.png") norm = Image.load("norm.png") screen:blit(0, 0, norm, false) ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() ![]() Mindless Self Indulgence
|
Code:
up = Image.load("up.png")
down = Image.load("down.png")
left = Image.load("left.png")
right = Image.load("right.png")
norm = Image.load("norm.png")
screen:blit(0, 0, norm, false)
screen.flip()
while true do
screen.waitVblankStart()
pad = Controls.read()
number = math.random(1,4)
if number == 1 then
if pad:cross() then
screen:blit(0, 0, down)
screen.flip()
screen.waitVblankStart(50)
end
if pad:circle() then
screen:blit(0, 0, right)
screen.flip()
screen.waitVblankStart(50)
end
if pad:square() then
screen:blit(0, 0, left)
screen.flip()
screen.waitVblankStart(50)
end
if pad:triangle() then
screen:blit(0, 0, up)
screen.flip()
screen.waitVblankStart(50)
end
end
read from a file and display data like if my txt file is like so: 1 9 5 7 3 6 3 7 4 7 3 then it will read the numbers one by one and display them. if line 1 == 1 then screen:blit (...........) or B: i want to generate a random number and record it and then wait for the user to input data before a certain number of Vblanks please help thank in advance
__________________
PSN:realn0whereman NEW MSI ALBUM APRIL 29TH: IF *orgasm* ![]() Last edited by BAWLS; 01-20-2006 at 05:43 PM.. |
|
|
|
![]() |
| Tags |
| lua , numbers , probabilty |
| Thread Tools | |
|
|