Scripts / Script when you press G to display the image

Author
Message
GDNomad
9
Years of Service
User Offline
Joined: 17th Jun 2015
Location:
Posted: 3rd Aug 2015 06:09
Help please,need a script when you press G to display the image..When you press G, the image disappears..
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 4th Aug 2015 17:57
Steps will be on the lines of:

{init section}
Load in Image
Declare a local state variable e.g. image_state and set either -1 or 0

{main section}

Detect if G key pressed
If pressed and state = -1 (or 0) then Display Image and set state variable to 1
if pressed and state = 1 then Hide image and set state variable to -1 (or 0)

{exit section} (if any)



Professional Programmer: Languages- SAS, C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen).

Login to post a reply

Server time is: 2024-12-22 01:37:20
Your offset time is: 2024-12-22 01:37:20