![]() |
| 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; Originally Posted by MagicianFB http://www.lua.org/pil/index.html#P3 http://luaplayer.org/functions.txt k thanx...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#31 | |
![]() ![]() Rock Star
|
Quote:
__________________
![]() |
|
|
|
|
|
|
#32 |
![]() ![]() Developer
|
In Lua tutorial 2 you can display pic's when you push a button. But how do I do so the image doesn't disapear directly after a stop pushing the button??I want the picture/text to stay there.
And how do I change the size of the text/numers in my program?? Thanks in advance! |
|
|
|
|
|
#34 |
|
11th Squad Captain
|
Hi i really need some help here.
My new game Dragon Ball Portable is very dodgy. It skatter's around. Is the code alright? (Please nobody steal this) How can i get the Picture to move up aswell??? Code:
--c5cha7's DBP (Beta source)
--activate usb
System.usbDiskModeActivate()
--load text colors
red = Color.new(255, 0, 0)
blue = Color.new(0, 0, 255)
green = Color.new(0, 255, 0)
black = Color.new(0, 0, 0)
white = Color.new(255, 255, 255)
--Startup
intro = Sound.load("Data/Sounds/intro.wav")
luaplayer = Image.load("Data/images/lua.png")
intro:play()
screen:blit(0, 0, luaplayer)
screen.flip(120)
screen.waitVblankStart(120)
-- Move Player
function move()
local limit = -11 -- adjust the count limit as needed
local pad = Controls.read()
if (pad ~= oldpad) or (countpads > limit) then
if pad:right() then
playerPos = playerPos + 1
if playerPos > 13 then playerPos = 13 end
screen.waitVblankStart(2)
end
if pad:left() then
playerPos = playerPos - 1
if playerPos < 0 then playerPos = 0 end
screen.waitVblankStart(2)
end
if pad:up() then
playerPos = playerPos - 1
if playerPos < 1 then playerPos = 1 end
end
if pad == oldpad then
countpads = limit - 1 -- for repeatedly advanced
else
countpads = 0 -- for the first pressed
end
oldpad = pad
else -- do nothing for a moment
countpads = countpads + 1
screen.waitVblankStart(5)
screen.waitVblankStart(4)
screen.waitVblankStart(1)
end
end
player = Image.load "player.png"
playerPos = 1
countpads = 0
while true do
screen:clear()
move()
screen:blit(32*playerPos, 120, player)
screen.waitVblankStart()
screen:flip()
end
__________________
FAVORITE GAME! - BEER & ANIME! - SO EXICTING! ![]() 開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋 Currently Working On: - Flashmod V2.50 - Flashmod V2.60 Currently Drinking: Coffee! - 私はコーヒーを飲む Chao Garden: DEMO v0.6 Chao Garden V0.5b Review! |
|
|
|
|
|
#35 |
![]() ![]() Developer
|
Sorry I forgot to post the code Here it is:
Code:
System.usbDiskModeActivate()
blue = Color.new(0, 0, 255)
orange = Color.new(223, 88, 6)
grey = Color.new(94, 97, 111)
yellow = Color.new(255, 255, 0)
black = Color.new(0, 0, 0)
white = Color.new(255, 255, 255)
x = 96
y = 96
speed = 3
while true do
screen:clear()
pad = Controls.read()
screen:print(x, y, "+", white)
if pad:select() then screen:save("screenshot.tga") end
if pad:start() then
break
end
if pad:analogX() < -30 then
x = x - speed
end
if pad:analogX() > 30 then
x = x + speed
end
if pad:analogY() < -30 then
y = y - speed
end
if pad:analogY() > 30 then
y = y + speed
end
if pad:left() then
x = x - 3
end
if pad:right() then
x = x + 3
end
if pad:up() then
y = y - 3
end
if pad:down() then
y = y + 3
end
if pad:start() then
break
end
if pad:cross() then
screen:print(20, 18, "1", white)
end
screen.waitVblankStart()
screen.flip()
end
|
|
|
|
|
|
#36 |
![]() |
What are the sound limitations in lua?..
I've been trying to make some background music, but what should it be in? I've got various wavs playing on events but they fail to play when I try to start them at the main menu. I just want some background music. Cheers. |
|
|
|
|
|
#37 | |
![]() NDS Mod
|
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] |
|
|
|
|
|
|
#39 | |
![]() NDS Mod
|
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] |
|
|
|
|
|
|
#41 | |
![]() NDS Mod
|
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] |
|
|
|
|
|
|
#44 | |
![]() NDS Mod
|
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] |
|
|
|
|
|
|
#48 |
![]() Advanced PSP Coder
|
Can anyone post an example using a function such as the main menu? Thanks so much.
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR] [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B] [B]Applications: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b] [B]Games: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer] [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b] [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center] |
|
|
|
|
|
#49 |
![]() ![]() Developer
|
well im working on something extremely minor, but it wont load. I keep getting an error.
.......... I got it up and running
__________________
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-06-2005 at 01:56 PM.. |
|
|
|
|
|
#51 | |
![]() NDS Mod
|
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] |
|
|
|
|
|
|
#52 | |
![]() ![]() Developer
|
Quote:
error: index.lua:4: bad argument #2 to 'blit' (Image expected, got s tring)
__________________
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 |
|
|
|
|
|
|
#53 | |
![]() NDS Mod
|
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] |
|
|
|
|
|
|
#54 |
![]() ![]() Developer
|
Thank You I have finally got it to load where I want IT!!!
__________________
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 |
|
|
|
|
|
#56 |
![]() ![]() Developer
|
im sorry that is my mistake...
__________________
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 |
|
|
|
|
|
#58 |
![]() Advanced PSP Coder
|
Can anyone explain how to make a Lua program availible to boot outside Lua? Like with an ebbot, so its in the list of games on the Memory Stick? Thanks!
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR] [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B] [B]Applications: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b] [B]Games: [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer] [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b] [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center] |
|
|
|
|
|
#59 |
![]() |
Pull the eboot's from another lua app.
Then edit the eboot in the (%) folder to change the icon/name. Thats it. There's probably a different way but this way works. Last edited by Bilo; 10-04-2005 at 05:30 PM.. |
|
|
|
|
|
#60 | |
![]() NDS Mod
|
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] |
|
|
|
|
![]() |
| Tags |
| code , lib , lua , luaplayer , noobs , programming , psp programming , scripting , thread |
| Thread Tools | |
|
|