QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

help with lua on numbers and probabilty

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) ...

Reply
 
LinkBack Thread Tools
Old 01-20-2006, 05:39 PM   #1

Mindless Self Indulgence
 
Realn0whereman's Avatar
 
Join Date: Oct 2005
Location: afk
Posts: 7,212
Trader Feedback: 0
Default help with lua on numbers and probabilty

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
i want to either A:
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..
Realn0whereman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
lua , numbers , probabilty

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 08:32 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us