![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; .................
![]() |
|
|
LinkBack | Thread Tools |
|
|
#92 |
![]() ![]() Developer
|
I am sorry to say that this one doent even display the text... i have noticed in whitehawks tutorial that he did it, so i am going to try and recreate that effect.
__________________
PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude http://www.cools.biaklan.com Currently Working on ????? Quote of the Week |
|
|
|
|
|
#93 |
![]() |
Code:
board = Image.load("boardnew.png")
screen:blit(0, 0, board, false)
black = Color.new(0, 0, 0)
screen:print(200, 130, "Board", black)
screen.flip()
while true do
screen.waitVblankStart()
end
![]() My excuse is that I'm not well. And so thats why what I told you to do was wrong
Last edited by Bilo; 10-05-2005 at 04:48 PM.. |
|
|
|
|
|
#94 |
![]() ![]() Developer
|
Thanks! It works perfectly! :icon_smil
__________________
PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude http://www.cools.biaklan.com Currently Working on ????? Quote of the Week Last edited by cools; 10-05-2005 at 05:42 PM.. |
|
|
|
|
|
#95 | |
![]() |
I've commeted your program to help you find out why it was doing what it was doing..
Quote:
|
|
|
|
|
|
|
#96 |
![]() ![]() Developer
|
Thanks Jenay. Hopefully this will not happen again!
__________________
PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude http://www.cools.biaklan.com Currently Working on ????? Quote of the Week |
|
|
|
|
|
#98 | |
![]() NDS Mod
|
Quote:
Ok put keyboard.lua (rename it to that) in the same file as your main code. Then put this in your main code: Code:
dofile("keyboard.lua")
Code:
-- Examples print(keyboard()) thetext = keyboard() ================= Start - Enter Value D-pad - select key R - Space L - Delete Select - Like holding down shift Control pad - Press the button corresponding with the character on the selected key ================ I've tested it and it seems to work on luaplayer v9 but not v11
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL] Last edited by MagicianFB; 10-05-2005 at 06:18 PM.. |
|
|
|
|
|
|
#99 |
|
I'm having a bit of trouble with the Timer function.
Using this as code: Code:
Timer = Timer.new(0) Code:
error: DEFUSE.LUA:27: attempt to index global 'Timer' (a nil value) Error: No script file found. Press start to restart |
|
|
|
|
|
|
#100 | |
![]() NDS Mod
|
Quote:
You have to use a colon.
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL] |
|
|
|
|
|
|
#101 |
|
Hm...I've got the timer now working, but I'm having another problem with it.
If I run the program once it works fine, but once I try and run it a second time I get this error: Code:
error: DEFUSE.LUA:152: loop in gettable Error: No script file found. Press start to restart Code:
Timer:start() |
|
|
|
|
|
|
#102 |
![]() |
MagicianFB, can you tell a little about your rpg? Are you just using screen sized backgrounds or can you do the scrolling bg most rpgs have?
I'm interested in doing an rpg myself, and since there seems to be no rpg maker in site for psp, I'm learning lua now. It'd be nice to hear a little about your project so I have a general idea of how to get started. Also, this may be a little advanced, but would there be a way to display some sort of fmv? I'm not expecting to be able to do a Final Fantasy or something as my very first project, but it seems like with the psp's power it shouldn't be a problem to have decent looking backgrounds and even a movie or two, right? Is there maybe a way for your lua script to make calls to the psp firmware functions? Like to use the psp's built in mp4 or mp3 playback? Or is that something that would need to be built into the actual lua player? Last edited by Snaku; 10-06-2005 at 07:59 AM.. |
|
|
|
|
|
#103 |
![]() |
Can u make lua loop this kind of code?
Code:
pad = Controls.read() if pad:circle() then screen:blit(0, 0, lua, false) screen:print(220, 170, "Fel", svart) screen:print(220, 190, "Triangel: Tillbaka", svart) screen:print(220, 210, "[]: Avsluta", svart) screen.flip() while true do jag = Controls.read() if jag:triangle() then screen:blit(0, 0, lua, false) screen:print(220, 170, "Hejsan", svart) screen:print(220, 190, "O: Nåt trevligt", svart) screen:print(220, 200, "X: Info", svart) screen:print(220, 210, "[]: Avsluta", svart) screen.flip() end end |
|
|
|
|
|
#104 | |
![]() NDS Mod
|
Just put a while true loop around the entire thing, too
Quote:
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL] |
|
|
|
|
|
|
#106 |
![]() ![]() Developer
|
Does anyone know how I can change a number to the numer-1 or +1 with the triggers (or any button) like in PSP Soduko?? So if I program a button to insert a 5 or any numer in 1, 1, then how can i change the 5 to go +1 each time I press the right trigger?
|
|
|
|
|
|
#108 | |
![]() ![]() Developer
|
Quote:
|
|
|
|
|
|
|
#109 | ||
|
hi im new to the whole modding a psp thing... im from england and just downgraded my firmware and started to learna bit of lua
heres the code of my first program (after that tutorial): Quote:
Quote:
|
|||
|
|
|
|
|
#110 |
![]() |
Maybe it has something to do with this
Code:
if pad:analogy() < -30 --I think you should have a big Y here instead of a small one then y = y - 1 end if pad:analogy() > 30 then y = y + 1 end |
|
|
|
|
|
#111 | |
![]() NDS Mod
|
Quote:
Edit: It make me sorta happy that this thread has lasted so long without being stickied.
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL] |
|
|
|
|
|
|
#113 |
![]() ![]() Developer
|
Im having some trouble creating dice. I just want to show the random number in a spot, then get rid of it, but i keep getting an error.
Code:
while true do pad = Controls.read() dice2 = math.random(6) if pad:cross() then if dice2==1 then screen:print(90, 50, "1", black) screen.flip() if dice2==2 then screen:print(90, 50, "2", black) screen.flip() if dice2==3 then screen:print(90, 50, "3", black) screen.flip() if dice2==4 then screen:print(90, 50, "4", black) screen.flip() if dice2==5 then screen:print(90, 50, "5", black) screen.flip() if dice2==6 then screen:print(90, 50, "6", black) screen.flip() screen.waitVblankStart() end end
__________________
PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude http://www.cools.biaklan.com Currently Working on ????? Quote of the Week |
|
|
|
|
|
#114 | |
![]() ![]() Developer
|
Quote:
__________________
![]() F.A.L.O?
Last edited by Twenty 2; 10-06-2005 at 03:36 PM.. |
|
|
|
|
|
|
#118 | |
![]() |
Quote:
Code:
while true do
pad = Controls.read()
dice2 = math.random(6)
if pad:cross() then
screen:print(90, 50,string.format("%d", dice2), black)
screen.flip()
screen.waitVblankStart()
end
end
|
|
|
|
|
|
|
#119 |
![]() ![]() Developer
|
You might actually want to try
Code:
blue = Color.new(0, 0, 225)
while true do
pad = Controls.read()
dice2 = math.random(6)
if pad:cross() then
screen:clear()
screen:print(90, 50,string.format("%d", dice2), blue)
screen.flip()
screen.waitVblankStart()
end
end
__________________
![]() F.A.L.O?
|
|
|
|
![]() |
| Tags |
| code , lib , lua , luaplayer , noobs , programming , psp programming , scripting , thread |
| Thread Tools | |
|
|