Zeige Ergebnis 10.141 bis 10.170 von 10238
Lua Programming Help Thread
This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; alright that's what i thought, thank you for your help...
-
08-08-2009, 12:22 AM #10141QJ Gamer Green
- Registriert seit
- Nov 2008
- Beiträge
- 35
- Points
- 2.236
- Level
- 28
- Downloads
- 0
- Uploads
- 0
alright that's what i thought, thank you for your help
-
08-08-2009, 12:29 AM #10142Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
No problem ;)
-
08-08-2009, 05:52 AM #10143QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2009
- Beiträge
- 10
- Points
- 1.880
- Level
- 25
- Downloads
- 0
- Uploads
- 0
-
08-08-2009, 04:23 PM #10144words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
sly_spy - We tend to ignore dan ;)
Here ya go...
Code:bPlaying = false; ... while true do ... pad = Controls.read(); if pad:cross() then if not bPlaying then bPlaying = true; sound:play(); end else if bPlaying then bPlaying = false; sound:stop(); end end ... end
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
08-08-2009, 05:21 PM #10145Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
@sg57 - i'll take that as a joke. It would take very minor adjustment to make my code work, instead of giving it to him on a plate, you should of let him work it out for himself.
-
08-08-2009, 07:13 PM #10146Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
in retrospect we always used to help you though so i see no harm in helping him, his question was quite a bit different than the code provided seen as he is a new coder
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-08-2009, 07:59 PM #10147Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
What advice did everyone used to always give me? I'm not going to word for word every quote but it went like this:
"Do stuff yourself, you learn more".
I provided a link to the evilmana tut, it explains all about playing sounds, stopping sounds etc.
If he looked through the tuts then he would see usage & explain else, elseif etc.
Now, i know that i'm not one to judge, a year ago i was like him, asking for code, not really looking doing stuff myself. But i regret that, & that stage is well gone. I'm just trying to get the 'do it yourself' habit plugged into his head like many of you did with me.
-
08-08-2009, 09:15 PM #10148words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
We are all conspiring against you dan, watch out ;)

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
08-08-2009, 09:38 PM #10149QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
08-08-2009, 09:50 PM #10150Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
-
08-08-2009, 10:13 PM #10151QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2009
- Beiträge
- 10
- Points
- 1.880
- Level
- 25
- Downloads
- 0
- Uploads
- 0
Thank you for leading me to a right way
but the code makes "loop in gettable",so i correct it to:
Code:bPlaying = false; ... while true do ... pad = Controls.read(); if pad:cross() then if not bPlaying then bPlaying = true; music=sound:play(); end elseif music then bPlaying = false; music:stop(); end ... end
-
08-08-2009, 10:36 PM #10152QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2009
- Beiträge
- 10
- Points
- 1.880
- Level
- 25
- Downloads
- 0
- Uploads
- 0
Dear Dan,sorry but you didnt know that,firstly,English is not my mother tongue,so i have many difficulties in reading the tutorial;secondly,DIY is a permanent credendum in my mind so that i work out codes of thousands of lines,can you put up with the samall codeblock i've asked for?thirdly,there is No one tells me how to figure it out in my home country,i have no choice but turning to you masters of lua.
-
08-09-2009, 01:52 AM #10153Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-09-2009, 05:14 AM #10154Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
-
08-09-2009, 06:25 AM #10155QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2009
- Beiträge
- 10
- Points
- 1.880
- Level
- 25
- Downloads
- 0
- Uploads
- 0
-
08-09-2009, 06:45 AM #10156Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-10-2009, 08:06 AM #10157
Achievements:
- Registriert seit
- Jul 2009
- Beiträge
- 26
- Points
- 1.768
- Level
- 24
- Downloads
- 0
- Uploads
- 0
HELP!!!
how to show a picture and make it disappear a few secend later???
-
08-10-2009, 08:08 AM #10158
Achievements:
- Registriert seit
- Jul 2009
- Beiträge
- 26
- Points
- 1.768
- Level
- 24
- Downloads
- 0
- Uploads
- 0
and how to make the picture move,how to control its speed?
-
08-10-2009, 09:25 AM #10159QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
hupengwei, it's called if statements, variables, and logic, learn the basics of programming than come back=-)
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
08-10-2009, 11:18 AM #10160QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
08-11-2009, 01:15 AM #10161QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
From hupengwei:
Starting with the easiest type of movement, let's get the image moving from left to right. Look at the logic you use to make the image move using the d-pad, how would you use the same concept to have the image move without input from the player?glad to see your reply.i didn't know much basic knowledge,what i did before is just copying different programs together.i think i need learn more, could you recommend some books for lua?
i could move the picture with the d-pad,but i want to make it move without pressing any button.i mean it moves itself.
As for books on Lua: Programming in Lua : contents[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
08-11-2009, 07:29 AM #10162
Achievements:
- Registriert seit
- Jul 2009
- Beiträge
- 26
- Points
- 1.768
- Level
- 24
- Downloads
- 0
- Uploads
- 0
i think i should use a timer and set a proper time,change the position of the picture,
but how to set a timer? SetTimer()???
forgive me for asking so many easy questions.i didn`t know much English and there were not any books on lua in Chinese.
By the way,how to show a picture and make it disappear a few secends later?
Change the value of its alpha??
-
08-11-2009, 08:02 AM #10163QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You don't need a timer, all I am asking is for you to simply write some code to move an image from the left of the screen to the right.
Oh really?forgive me for asking so many easy questions.i didn`t know much English and there were not any books on lua in Chinese.[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
08-11-2009, 08:18 AM #10164QJ Gamer Blue
Achievements:
- Registriert seit
- Aug 2009
- Beiträge
- 10
- Points
- 1.880
- Level
- 25
- Downloads
- 0
- Uploads
- 0
does LP HM has a limit for wav?
as i tried,it can load 700kbps but 1400kbps
Well,how many kbps is its upper limit?
-
08-11-2009, 05:49 PM #10165
Achievements:
- Registriert seit
- Jul 2009
- Beiträge
- 26
- Points
- 1.768
- Level
- 24
- Downloads
- 0
- Uploads
- 0
yes,this is the code i use to make picure move
x=0
y=100
img= Image.load("Logo.png")
while x<480 do
screen:clear()
screen:blit(x,y,img)
screen.flip
screen:waitVblankstart
x=x+1
endit`s true.i`ve already bought the book 2 weeks ago,the last 70pages are still in englishforgive me for asking so many easy questions.i didn`t know much English and there were not any books on lua in Chinese.
-
08-11-2009, 05:50 PM #10166
Achievements:
- Registriert seit
- Jul 2009
- Beiträge
- 26
- Points
- 1.768
- Level
- 24
- Downloads
- 0
- Uploads
- 0
em...as i tried,the upper limit seems to be about 1200
-
08-11-2009, 10:17 PM #10167Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
you need to set a flag to make the image stop or move left again.
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-11-2009, 10:53 PM #10168
Achievements:
- Registriert seit
- Jul 2009
- Beiträge
- 26
- Points
- 1.768
- Level
- 24
- Downloads
- 0
- Uploads
- 0
i konw but i don`t konw how to....this is what i am asking for......you need to set a flag to make the image stop or move left again.
Maybe i didn`t express very clear,just because of my poor english
-
08-11-2009, 11:27 PM #10169Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
?Code:local logo = { x = 0, y = 100, img = Image.load("Logo.png"), directionFlag = 1 } local function moveLeftRight(_minX, _maxX, _speed, _itemTable) if _itemTable.directionFlag == 1 then _itemTable.x = _itemTable.x + _speed if _itemTable.x > _maxX then _itemTable.x = _maxX _itemTable.directionFlag = -1 end elseif _itemTable.directionFlag == -1 then _itemTable.x = _itemTable.x - _speed if _itemTable.x < _minX then _itemTable.x = _minX _itemTable.directionFlag = 1 end end end while true do screen:clear() moveLeftRight(0, 100, 1, logo) screen:blit(logo.x, logo.y, logo.img) screen.flip() screen.waitVblankstart() end------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
08-12-2009, 03:37 AM #10170
Achievements:
- Registriert seit
- Jul 2009
- Beiträge
- 26
- Points
- 1.768
- Level
- 24
- Downloads
- 0
- Uploads
- 0
this is mine.i firmly know how to Move,But i want to {STOP},how to stop is the question .if you can,how to change the alpha value of apicture?i want to fadein and fadeout some picturesCode:function MovePicture(PathAndFile,MType,speed) if MType == 1 then logo = Image.load("./Pictures/"..PathAndFile) x=-480 while x<480 do screen:clear() screen:blit(x,0,logo) screen.flip() screen.waitVblankStart() x=x+speed end end if MType == 2 then logo = Image.load("./Pictures/"..PathAndFile) x=480 while x>-480 do screen:clear() screen:blit(x,0,logo) screen.flip() screen.waitVblankStart() x=x-speed end end if MType == 3 then logo = Image.load("./Pictures/"..PathAndFile) y=-272 while y<272 do screen:clear() screen:blit(0,y,logo) screen.flip() screen.waitVblankStart() y=y+speed end end if MType == 4 then logo = Image.load("./Pictures/"..PathAndFile) y=272 while y>-272 do screen:clear() screen:blit(0,y,logo) screen.flip() screen.waitVblankStart() y=y-speed end end end
Ps this code moves two fast,and how to slow it down??Geändert von hupengwei (08-12-2009 um 03:40 AM Uhr) Grund: forget one important thing


LinkBack URL
About LinkBacks
Mit Zitat antworten
and you cant say that I didn't, if you do I will cry :Cry:

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum