![]() |
| 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; can some1 post all the functions explain them to me thoroly...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#271 |
![]() ![]() ...in a dream...
|
can some1 post all the functions explain them to me thoroly
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#272 |
![]() ![]() Developer
|
yea same here
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
#273 | |
![]() NDS Mod
|
Quote:
http://luaplayer.org/functions.txt These two are sort of the same, although some time I find the second link easier to understand: http://www.lua.org/pil/ http://www.lua.org/manual/5.0/
__________________
"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] |
|
|
|
|
|
|
#274 |
![]() Advanced PSP Coder
|
You should be able to understand the functions. You didn't even say please, you just asked a VERY big task of us, or basically told us to do that. Which functions do you not understand?
__________________
[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] |
|
|
|
|
|
#275 |
![]() |
Okay, i need help with my bullet moement code. Now, i can make the bullet shoot out of the plane, no matter where it is located, but now i must make it MOVE! And you guys can help me, hopefully!
Okay, here is a snidbit. elseif pad:r() then if shoot >= 1 then -- Blit the rest of the stuff you do as if you weren't shooting -- don't know what all those images are so just add more screen:blit() updateMove() screen:blit(btXpos, btYpos, bullet1) screen:blit(pcXpos, pcYpos, sprite) screen.waitVblankStart() screen.flip() bl = bl + 1 shoot = shoot - 1 end --that is to shoot^ elseif pad:triangle() then if shoot <=0 then shoot = shoot + 1 end --that is to recharge shot^ --Functions Bullet1 = function() btYpos = btYpos + 2 updateMove() screen:blit(btXpos, btYpos, bullet1) screen.waitVblankStart() screen.flip() bl = bl + 1 end --A function I made^ --Bullet System while true do if bl == 1 then do Bullet1() --What calls the function^ Somehow everytime i run the game, my PSP freezes up, im not using lua player, i am using my own eboot. It is an old one. Should i update my lua eboot with the new lua player? PLease, help me, and thanks in advance!!! |
|
|
|
|
|
#276 |
![]() ![]() ...in a dream...
|
well just some1s for a game, common ones used alot u kno so wat r they
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#279 |
![]() ![]() ...in a dream...
|
1st tht wasnt thorough 'make ur own' 2nd, i thot u were supposed to help not critisize
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#280 |
![]() |
I wasnt criticising anyone, I was just asking twenty 2 if he was talking to me. Also, i you were talking to him about the english bit, listen to him, he has got a point. This isnt AOL talk, this is a forum, where spelling and grammer counts alot, and if you spell bad or diss users, people lose respect for you. At first, I would not spell great or talk AOL talk. But one user told me that you will lose respect that way, and guess what, I improved my act, and you should to. And dont throw a fight just because someone sugested you should clean up your english, he didnt say "Hey asswipe, you better speak better, or I wont help you" He just simply said to improve a little. I hope you understand my point, like a fellow user in these forums did. Because, i couldnt understand a couple of your posts above.
On topic, may someone help me with my code above? Thanks. |
|
|
|
|
|
#281 | |
![]() ![]() Developer
|
Quote:
What i ment is that a function can be ANYTHING. For example: function addone() if adding==true then x=x+1 end end Then in your main coding you could say: if moving==true then addone() end I thought you were also making a halo sidescroller, shouldnt you know this? And i wasnt talking to you master Inu.
__________________
![]() F.A.L.O?
|
|
|
|
|
|
|
#282 |
![]() |
oh okay, well, um if you can can you help me. What my code demonstrates it me trying to get the bullet system to work, but to no avail, and that is not my entire coding, as i dont feel like sharing it with everyone. If you would like the whole code, I would be glad to pm it to you, just as long as someone helps me with this. Also, good luck on the Falo project!
|
|
|
|
|
|
#283 | |
![]() ![]() ...
Join Date: Oct 2005
Location: The US of A Hombrew: Quak Arena Projects: RIFT
Posts: 381
Trader Feedback: 0
|
Quote:
Code:
if input:oldinput() then and Code:
read:input() also.... Code:
function readinput() input = Controls.read() if input:oldinput() then if input:left() and listpos > 1 then listpos = listpos - 1 end if input:right() and listpos < table.getn(gunlist) then listpos = listpos + 1 end oldinput = input end same answer as in the other thread you made
__________________
... |
|
|
|
|
|
|
#284 |
![]() ![]() ...in a dream...
|
my fault anyway but how would i make an arc function you dont have to tell me i cud figure it out but take a lil more time
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#285 |
![]() ![]() ...in a dream...
|
also, sorry everyone, my computers broken and im on fired up browser and it crashes when typing alot so please forgive me
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#286 |
![]() |
Code:
--Colors
yellow = Color.new(255, 255, 0)
--Colors
--Defining Code
screen:print(194, 136, "Loading: 0%", yellow)
screen.flip()
background = Image.load("Images/Backgrounds/background.png")
screen:clear()
screen:print(194, 136, "Loading: 10%", yellow)
screen.flip()
object1 = Image.load("Images/Base_Blue/Structures/barracade_small.png")
screen:clear()
screen:print(194, 136, "Loading: 20%", yellow)
screen.flip()
object2 = Image.load("Images/Base_Blue/Structures/barracade_small.png")
screen:clear()
screen:print(194, 136, "Loading: 30%", yellow)
screen.flip()
player = Image.load("Images/Base_Blue/Vehecles/Suddan_Tank_Left_Down.png")
screen:clear()
screen:print(194, 136, "Loading: 40%", yellow)
screen.flip()
object4 = Image.load("Images/Base_Blue/Structures/Main_Base.png")
screen:clear()
screen:print(194, 136, "Loading: 50%", yellow)
screen.flip()
object5 = Image.load("Images/Base_Blue/Structures/adv. power plant_1.png")
screen:clear()
screen:print(194, 136, "Loading: 60%", yellow)
screen.flip()
sidebar = Image.load("Images/Base_Blue/Misc/sidebar.png")
intro = Image.load("Images/Misc/intro.png")
screen:clear()
screen:print(194, 136, "Loading: 80%", yellow)
screen.flip()
Start_Menu = Image.load("Images/Misc/Start_Menu.png")
screen:clear()
screen:print(194, 136, "Loading: 100%", yellow)
screen.flip()
Bigfoot_Music = Sound.load("Music/bigfoot.wav")
--Ende Defining Code
--Player Spawn
x = 50
y = 50
x_object = {0, 100, 200}
y_object = {0, 100, 200}
--End Player Spawn
--Main Code
while true do
screen:clear()
pad = Controls.read()
-- showing the background + objects
screen:blit(x_object[1], y_object[1], background)
screen:blit(x_object[2], y_object[2], object1)
screen:blit(x_object[3], y_object[3], object2)
screen:blit(x_object[3], y_object[1], object4)
screen:blit(x_object[2], y_object[3], object5)
screen:blit(x_object[3], y_object[2], object1)
-- showing the player
screen:blit(x, y, player)
if pad:up() then
y = y - 1
if y < 50 then
for i= 3,1,-1 do
y_object[i] = y_object[i] + 1
end
y = y + 1
end
end
if pad:down() then
y = y + 1
if y > 222 then
for i=3,1,-1 do
y_object[i] = y_object[i] - 1
end
y = y - 1
end
end
if pad:right() then
x = x + 1
if x > 430 then
for i=3,1,-1 do
x_object[i] = x_object[i] - 1
end
x = x - 1
end
end
if pad:left() then
x = x - 1
if x < 50 then
for i=3,1,-1 do
x_object[i] = x_object[i] + 1
end
x = x + 1
end
end
if pad:select() then
break
end
--Sidebar
screen:blit(370, 0, sidebar)
screen.flip()
--End Sidebar
if pad:start() then
screen:blit(0, 0, Start_Menu)
screen.flip()
screen.waitVblankStart(160 )
end
Now i have a problem. Its a scroling map i know but if i come outside the map its black. How can i change it ? Or how can i large the map ? And how do i make positions so that the "buildings" are stuck on the map that they move with the map ? |
|
|
|
|
|
#287 |
![]() |
Ive got a small question.
My problem is that I want to press a button then around 1/2-1 second later a image to be blit. I don't know the code for it and ive been looking around for a while. I was wondering if theres a way to do it? Last edited by Sir Crx; 11-13-2005 at 12:55 PM.. |
|
|
|
|
|
#288 |
![]() |
Okay do this
image = Image.load("image.png") pad = Controls.read() if pad:cross() then screen.waitVblankStart(60 ) screen:blit(x, y, image, false) end That should do it. There are 60 Vblanks in one second! (x, y) are the coordinates for the picture. Hope that helped! |
|
|
|
|
|
#290 |
![]() |
Ok well doing vblankstart is what i did before I even posted and it didnt work but for some reason after like 5 hours of changing things around it finally works.
Yet I have 2 MORE noob questions: 1) if I use the vblankstart for the delay in the image blit when I hold down the button it will flash the picture then go back to waiting, then blit it again. Its in a non stop vblankstart then blit mode. All I want is just to wait then blit it. Yet using vblankstart doesnt seem to do that. 2)If I blit too many images at once in a somewhat small space they tend to not show up if i do it fast. Yet if I go really slow in pushing the buttons i can successfully get all of them to show, but the point of my game is to move fast to blit all the images when the buttons are pushed but they tend to show whenever they feel like it. I hope I portrayed my problem well. If not im willing to answer questions because this is the only thing holding me back from completinga major part in my code. Thanks in advance Last edited by Sir Crx; 11-14-2005 at 01:41 AM.. |
|
|
|
|
|
#291 |
![]() |
ok i dont know if this is noob question or not, (probably is), ok so is there a way to to write so that whenever a the cursor goes on a certian picture it can trigger a command if the x button is pressed such as opening another image without writing something like this
if x0 < 80 then if x0 > -10 then if y0 < 242 then if y0 > 215 then EDIT, nvm allready figured out how to do it. Last edited by simmcity; 11-20-2005 at 10:58 AM.. |
|
|
|
|
|
#293 | |
![]() ![]() Developer
|
k i'm back finally my comp got all mean to me in a better way to put it so i did what he said and what do u mean missing an end well maybe explaining what im trying to do well help so here it is what i'm trying to do is make something where if you push left it will blit the a certain picture left and keep going but if i press right it will go back one picture and if i push left it will go forward a picture so thats wheat i'm trying to do i'll be glad to answer questions if it helps also it still just says running script anyway so you dont gatta go back a page or 2 to find my code i well post it here i havnt really made any changes to it because my dam comp's been screwey anywho here it is
Quote:
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
|
#294 | |
![]() |
Quote:
Thanks again |
|
|
|
|
|
|
#295 |
|
Hi folks!
I'm writing an application in LUA with LUAEDIT and I'd like to test it on my PC before putting it in the PSP, but... how can I simulate on my PC the commands for the PSP (cross, square, x and triangle or whatever) in order to see if everything is OK? I don't like to move each time the .lua file because I don't want to change the paths of the images)
|
|
|
|
|
|
|
#296 | |
![]() |
Quote:
|
|
|
|
|
|
|
#297 | |
![]() ![]() Rock Star
|
Quote:
it is kindof buggy though
__________________
![]() |
|
|
|
|
|
|
#298 | |
|
Quote:
so how can I play the buttons when I have my .lua program working in the DOS windows? |
||
|
|
|
|
|
#299 | |
![]() |
Quote:
|
|
|
|
|
|
|
#300 |
![]() ![]() ...in a dream...
|
can any1 help me with an arc function?
something like functionArc() arrow = soemthing like that i dunno can someone help please?:icon_sad:
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
![]() |
| Tags |
| code , lib , lua , luaplayer , noobs , programming , psp programming , scripting , thread |
| Thread Tools | |
|
|