Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / help plz (no snippet buttons)

Author
Message
Ads
21
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 27th Sep 2003 00:25
how do I make it so a image is displayed depending on the last buttons pressed
eg. so if left was pressed a image is displayed and stays till the next button is pressed.
MagiKnight
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location:
Posted: 27th Sep 2003 00:44
easy

If upkey() then paste image 1, x, y, 1
If downkey() then paste image 2, x, y, 1
If leftkey() then paste image 3, x, y, 1
If rightkey() then paste image 4, x, y, 1

MMMMMM Low level programmimg...
Ads
21
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 27th Sep 2003 00:49
it works thanks but the image just keeps going like a big long snake
Ads
21
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 27th Sep 2003 01:03
i want it so when:
left is pressed an image comes on and stays on until another button is press and then the left displayed image disappaears
zzabb
21
Years of Service
User Offline
Joined: 25th Apr 2003
Location: Seattle, USA
Posted: 27th Sep 2003 03:13 Edited at: 27th Sep 2003 04:47
the sync clears the image and you set a variable to paste the image

like this


sync on
sync rate 0
hide mouse

LOAD IMAGE "d01.bmp",1
LOAD IMAGE "d02.bmp",2
LOAD IMAGE "d03.bmp",3
LOAD IMAGE "d04.bmp",4

t=1
do

if upkey()=1 then t=1
if downkey()=1 then t=2
if leftkey()=1 then t=3
if rightkey()=1then t=4

paste image t,0,0
sync
loop

My advice is free -
unfortunately you get what you pay for (-:
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Sep 2003 08:27
I think what you may be looking for is like this.(two ways of do it pick the one that works for you.)

if inkey$()<>"" then blah

or

if scankey()<>0 then blah

the "<>" bit means not equal key pressed.

In Space No One can Hear You Scream! (When your comm Line is cut?)

Login to post a reply

Server time is: 2024-09-21 01:05:09
Your offset time is: 2024-09-21 01:05:09