![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on simple q within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; how do i make somthing happen when a button is RELEASED (lua)...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() ![]() Tha Sigerator
|
how do i make somthing happen when a button is RELEASED (lua)
__________________
- - - - Somewhere Lurking in THA SHADOWS - - - -
|
|
|
|
|
|
#3 | |
|
11th Squad Captain
|
Quote:
if pad:cross()==false then whatever here 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! |
|
|
|
|
|
|
#4 |
![]() ![]() total-Z
|
STOP MAKING SO MANY THREADS
And you need to write a script that controls that. I wrote advanced controls lib for warioware psp.
__________________
牧来栠摩琠敨映汩獥PSN: youresam From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth |
|
|
|
|
|
#5 |
![]() |
Well, i think it's like:
Code:
red = Color.new(255, 50, 0) function rofl() screen:print(180, 130, "pwntr", red) end while true do pad = Controls.read() if pad:cross() then -- Now when you hold the button, then it runs the function looping, but after you release... rofl() end -- then happens this screen:clear() end |
|
|
|
|
|
#6 |
![]() ![]() Tha Sigerator
|
umm.....jus 2 threads......WOW
i thought this q was asked b4 (remember seeing it) but when i searched i couldn't find it. i may try an "else" statement. IDK edit: OMFG!! haha that worked ok im outta here
__________________
- - - - Somewhere Lurking in THA SHADOWS - - - -
|
|
|
|
|
|
#8 | |
![]() ![]() total-Z
|
Quote:
__________________
牧来栠摩琠敨映汩獥PSN: youresam From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth |
|
|
|
|
|
|
#10 | |
![]() |
Quote:
yuor questions dont always get answered in there
__________________
[CENTER] [SIZE=3][COLOR=Red] [COLOR=black]I'm a Boy. [COLOR=Red]: )[/COLOR][/COLOR] [/COLOR][/SIZE] [/CENTER] |
|
|
|
|
|
|
#12 |
![]() ![]() ...in a dream...
|
I dont blame em', do it yourself, and if you cant, thats kinda pathetic... You have the entire internet at your fingertips and your asking someone else to do a simple sidescrolling backround? WOW, this day and age has gotten lazy!
If your still stuck on such an easy thing, either go to lumo's website and copy his if your desperate, or just do the easiest thing possible... take your backround... make it 512 (right? the biggest it can hold?) x 272... blit it once at the co0ordinates 0x0 as something like 'x' and 'y' and then blit it again, but at the co0ordinates 512x0 as something like 'x2' and 'y2'.... Then simply have the 'x' and 'x2' both - what ever speed you want it to scroll in the while loop, or if statement or whatever... Then you have a scroling backround.. but it isnt done yet... Now add something like 'if x < -511 then x = 0 and x2 = 512 end'.... Im a little suprised at how some cannot use logical steps in order to do what they want....Or use google to ask something like '"scrolling backround program code"' or something, that will atleast give you something that explains whats going on in what ever language it is in, then that person could just base theres off the other one... This scrolling backround may get a tad buggy since the co-ordinates are fixed 1 pixel away from there end, so if the speed is bigger then 1, youd have to shorten it up a bit... Oh and in C, you can declare your images size, and if the images size was bigger then what ever the real dimensions were, it just copys it over, so in C you wouldnt need to blit it 2 times, just 1nce with the X dimension as 1024... But in LUA i dont no if that is true...
__________________
...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) Last edited by SG57; 04-08-2006 at 01:55 PM.. |
|
|
|
|
|
#14 |
![]() ![]() ...in a dream...
|
Common Sense is also a good quality when used...
__________________
...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) |
|
|
|
|
|
#16 |
![]() ![]() Tha Sigerator
|
umm...does r u talkin to me? ^^^
hell is anythong on this page related to me......
__________________
- - - - Somewhere Lurking in THA SHADOWS - - - -
|
|
|
|
|
|
#18 | |
![]() ![]() total-Z
|
Quote:
__________________
牧来栠摩琠敨映汩獥PSN: youresam From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth |
|
|
|
|
|
|
#19 | |
![]() |
Quote:
for(; { //infinite looppspCtrlReadBufferPositive (&pad, 1); //reads what controls are pressed while (pad. Buttons & PSP_CTRL_CROSS) { //while X is pressed printf("hey you SOB!"); pspCtrlReadBufferPositive (&pad, 1); //reads what controls are pressed } pspDebugScreenClear; } //end big infinite loop I just did all that off the top of my head, but it should display hey you SOB! when and only when X is pressed. If not, then I need to go back and look at that code and how I did it... |
|
|
|
|
![]() |
| Tags |
| simple |
| Thread Tools | |
|
|