QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

simple q

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)...

Reply
 
LinkBack Thread Tools
Old 04-08-2006, 08:58 AM   #1

Tha Sigerator
 
Xodiac21's Avatar
 
Join Date: Jul 2005
Location: New Orleans, LA
Posts: 4,047
Trader Feedback: 0
Default simple q

how do i make somthing happen when a button is RELEASED (lua)
__________________
- - - - Somewhere Lurking in THA SHADOWS - - - -

Check Out My Myspace HERE
Comment My Qj Wiki
Xodiac21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 09:10 AM   #2
 
Join Date: Jan 2006
Location: stevens bumhole
Posts: 10,308
Trader Feedback: 0
Default

i have no idea... lol (again) im irritating, i know... sorry...
madsoul is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 09:11 AM   #3
11th Squad Captain
 
c5cha7's Avatar
 
Join Date: Jun 2005
Location: You are here -----> 名前: アダム | 飲むコー&#1
Posts: 2,562
Trader Feedback: 0
Default

Quote:
Originally Posted by xodiac21
how do i make somthing happen when a button is RELEASED (lua)
you could try
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!
c5cha7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 09:13 AM   #4

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

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
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 09:15 AM   #5
 
Rixorster's Avatar
 
Join Date: Apr 2006
Posts: 109
Trader Feedback: 0
Default

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
Rixorster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 09:15 AM   #6

Tha Sigerator
 
Xodiac21's Avatar
 
Join Date: Jul 2005
Location: New Orleans, LA
Posts: 4,047
Trader Feedback: 0
Default

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 - - - -

Check Out My Myspace HERE
Comment My Qj Wiki
Xodiac21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 09:16 AM   #7
 
Rixorster's Avatar
 
Join Date: Apr 2006
Posts: 109
Trader Feedback: 0
Default

did my shiat work? <.<
Rixorster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 09:27 AM   #8

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

Quote:
Originally Posted by xodiac21
umm.....jus 2 threads......WOW
Its not just you, I'm just sick of all the threads people make when they belong in the Lua Help Thread.
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 12:10 PM   #9

Gutya
 

 
Join Date: Feb 2006
Posts: 2,398
Trader Feedback: 0
Default

I mean, is it so hard to post in the LUA help sticky?
__________________
D:
Gutya is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 12:12 PM   #10
 
Join Date: Nov 2005
Posts: 5,272
Trader Feedback: 0
Default

Quote:
Originally Posted by Gutya
I mean, is it so hard to post in the LUA help sticky?

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]
Hooger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 01:29 PM   #11
 
Rixorster's Avatar
 
Join Date: Apr 2006
Posts: 109
Trader Feedback: 0
Default

Yep, nobody answered my sidescrolling question <.<
Rixorster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 01:50 PM   #12

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

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...
__________________

Last edited by SG57; 04-08-2006 at 01:55 PM..
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 02:01 PM   #13

Gutya
 

 
Join Date: Feb 2006
Posts: 2,398
Trader Feedback: 0
Default

Patience is a virtue, if it goes back more than 2 pages, then ask someone to read it.
__________________
D:
Gutya is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 02:08 PM   #14

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

Common Sense is also a good quality when used...
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 02:08 PM   #15

Mindless Self Indulgence
 
Realn0whereman's Avatar
 
Join Date: Oct 2005
Location: afk
Posts: 7,212
Trader Feedback: 0
Default

ima nub but cant u also do while not pad:cross then ...?
__________________
PSN:realn0whereman
NEW MSI ALBUM APRIL 29TH: IF
*orgasm*
Realn0whereman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 02:18 PM   #16

Tha Sigerator
 
Xodiac21's Avatar
 
Join Date: Jul 2005
Location: New Orleans, LA
Posts: 4,047
Trader Feedback: 0
Default

umm...does r u talkin to me? ^^^

hell is anythong on this page related to me......
__________________
- - - - Somewhere Lurking in THA SHADOWS - - - -

Check Out My Myspace HERE
Comment My Qj Wiki
Xodiac21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 03:06 PM   #17

Mindless Self Indulgence
 
Realn0whereman's Avatar
 
Join Date: Oct 2005
Location: afk
Posts: 7,212
Trader Feedback: 0
Default

im related to the girl in ur sig :P
__________________
PSN:realn0whereman
NEW MSI ALBUM APRIL 29TH: IF
*orgasm*
Realn0whereman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-08-2006, 03:12 PM   #18

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

Quote:
Originally Posted by realn0whereman
im related to the girl in ur sig :P
LOL, nice!
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-15-2006, 04:19 PM   #19
 
Join Date: Jan 2006
Posts: 4,288
Trader Feedback: 0
Default

Quote:
Originally Posted by xodiac21
umm...does r u talkin to me? ^^^

hell is anythong on this page related to me......
Well, I did something like this in C a while ago, as a learning/test app. What I did was basically

for(; { //infinite loop
pspCtrlReadBufferPositive (&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...
soccerPMN is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
simple

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 07:18 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us