AllExperts > Experts 
Search      

Macromedia Director

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Macromedia Director Answers
Question Library

Ask a question about Macromedia Director
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Arvind
Expertise
I can answer questions on creating simple games using Director 8 and Director 8.5. Please no questions on 3D aspects. Lingo questions welcomed.

Experience
I am at University and have completed an HND in Computing and Mathematical Sciences, and a BSc in Multimedia Technology. Below is my dissertation which is on Interactive Gaming: -

G@ME-i 2
 
   

You are here:  Experts > Computing/Technology > Web Design > Macromedia Director > Dual Input

Topic: Macromedia Director



Expert: Arvind
Date: 3/12/2004
Subject: Dual Input

Question
How can I have director take 2 keys at the same time? For ex: Player 1 uses arrow keys and player to uses wasd. I need for player one and player 2 to be able and move at the same time. Thanks for any help! I can get it with the mouse and keyboard but not keyboard and keyboard.

Wanted420

Answer
Hi,
  Hmmm...I seem to be having problems aswell!  Here's the code I used.  This is put on the script channel where both the players are situated: -

on exitFrame me
 go the frame
end

on keyDown me
 case (the keyCode) of
   13 : sprite(2).locV = sprite(2).locV -4
   1 : sprite(2).locV = sprite(2).locV +4
   0 : sprite(2).locH = sprite(2).locH -4
   2 : sprite(2).locH = sprite(2).locH +4
   126 : sprite(1).locV = sprite(1).locV -4
   125 : sprite(1).locV = sprite(1).locV +4
   123 : sprite(1).locH = sprite(1).locH -4
   124 : sprite(1).locH = sprite(1).locH +4
 end case
end

Here's a list of Director Keycodes if you need them: http://www.macromedia.com/support/director/ts/documents/keycodes.htm

The script allows both players to use the keyboard, BUT it seems that only 1 player can move at a time.

Sorry I couldnt help further... but your welcome to post your problem to another expert who may be able to help you more.

From Arvind

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.