• Welcome to Valhalla Legends Archive.
 

Using arrow keys

Started by MoNksBaNe_Agahnim, November 16, 2003, 06:08 PM

Previous topic - Next topic

MoNksBaNe_Agahnim

I found the hexdecimal code for using the arrow keys, how would i plug it in to make an X that appears on the screen (know how to output an "x" hehe) be able to move the X around the screen?

[edit]:change of subject

Spht

#1
Variables X and Y store the location of "X." When KeyDown is pressed, Y += 1; when KeyUp is pressed, Y -= 1; when KeyRight is pressed, X += 1; when KeyLeft is pressed, X -= 1.

When you're done that, draw an "X" (how to do that depends on what you're using) at the coordinates X, Y.

Eibro

Eibro of Yeti Lovers.

iago

Quote from: Spht on November 16, 2003, 08:28 PM
Variables X and Y store the location of "X." When KeyDown is pressed, Y += 1; when KeyUp is pressed, Y -= 1; when KeyRight is pressed, X += 1; when KeyLeft is pressed, X -= 1.

When you're done that, draw an "X" (how to do that depends on what you're using) at the coordinates X, Y.

I think he was more concerned about how to draw the x in c++ :P
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Spht

Quote from: iago on November 17, 2003, 02:45 AM
Quote from: Spht on November 16, 2003, 08:28 PM
Variables X and Y store the location of "X." When KeyDown is pressed, Y += 1; when KeyUp is pressed, Y -= 1; when KeyRight is pressed, X += 1; when KeyLeft is pressed, X -= 1.

When you're done that, draw an "X" (how to do that depends on what you're using) at the coordinates X, Y.

I think he was more concerned about how to draw the x in c++ :P

Redundant help is better than no help.