-
Hi i was woundering if you could help.
I am trying to make a simple game on flash 4, and I would like to
know if it is possible that when i move an object around the screen
with the arrow keys that if it passes over a certain object and you
press anouther button, say Space Bar, it would take a life of the
other object.
Also can you make the computer controol an object around and attack
you.
Thanks for your help
Bertie.
-
The first part of your problem seems pretty doable.
All you would have to do is use the get property action to check the x and y positions of the different objects on the screen -- make sure they are movie clips with instance names. When the space bar is pressed, you could check if two different movie clips had the same x and y values (or within 5 pixels, or whatever) and if so, you could subtract a a life, or whatever you want.
The second part sounds much harder, and since I don't know what your game is I don't know what you mean by "attack." You will probably want to use the random number function to give the computer the illusion of error, otherwise it will be too good. You can have it slowly chase you, or shoot at you, sure. But it's a little too complicated for a bb answer.
-
Hi thanks for your advise,
The thing is i am a begineer on flash and half of what you said I did not really understand. Is there any web page with the actuall programming stuff that I could chand the figures.
Thanks for your answer though
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|