• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

Lock Key Controls

Right now I designed a game which I use the arrows on the keyboard to move an object.  What I want to do is to lock the key controls once the object dies.  Is there anyway in doing so?  And activate it once I reload the game again.

Thanks!
0
n-generation
Asked:
n-generation
1 Solution
 
GeneMCommented:
Sometimes the simplest way to do something like this is the best way.  For example, you could do something like this:


Public ObjDead as boolean

'Then in the form load:
ObjDead = false

'When the object dies:
ObjDead = true

'Then in the logic where you process the keys (keydown,etc), you could do:

If objdead then exit sub

I hope this helps....

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now