0 Members and 1 Guest are viewing this topic.
I misread your code a bit, sorry.Quote from: ScoutDavid on November 27, 2010, 09:40:31 amNow, I want Pic1 to move 10pixels right, every time I press the key right (which is getkey(3)).However, what your code would do if that were valid syntax (see what I said on Pt-Off( above) is this:XOR Pic1 at (0,0) (equivalent to just drawing it if the area is empty)Erase Pic1 at (0,0)Until you press right, flash Pic1 at (0,10) (I think you mean (10,0). The Pt- commands take their arguments as X,Y,SPRITE)
Now, I want Pic1 to move 10pixels right, every time I press the key right (which is getkey(3)).
Getkey with a number in parhentesis at the end is indeed what you use if you want to have multiple keypresses. For example, getkey(54) will check if 2ND is pressed. It will return 1 if it is and 0 if it isn't.However, I think for multiple keypresses in a loop you would need to do the following:Repeat getKey(3) and (getkey(4))because of an axe glitch or something.Could you explain in more details what you are trying to do?Also I hope this projects continues again soon.
also, turn off full speed mode before that method of getting a key, it will return 1 if a key in it's group is pressed, not just the unique key itself.
:[38107C1010282828->Pic1:Pt-Change(0,0,Pic1:DispGraph:Repeat getKey(3):Pt-Off(0,0,Pic1:Pt-Change(0,10,Pic1:End
Code: [Select]:[38107C1010282828->Pic1:Pt-Change(0,0,Pic1:DispGraph:Repeat getKey(3):Pt-Off(0,0,Pic1:Pt-Change(0,10,Pic1:EndBack to code.. How's that?
:[38107C1010282828->Pic1:Pt-Change(0,0,Pic1:DispGraph:Repeat getKey(3):ClrDraw:Pt-Change(0,10,Pic1:DispGraph:End
yes
Quote from: aeTIos on November 27, 2010, 01:52:42 pmyesThat's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?
Quote from: ScoutDavid on November 27, 2010, 01:53:15 pmQuote from: aeTIos on November 27, 2010, 01:52:42 pmyesThat's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?That would pretty much be the same thing, aside from the you rule part
yes, that should work. || ||| (better now? vvvvv