At 10/7/05 02:22 AM, assassingao wrote:
Oh , there are more questions that aren't answered...
First of all , I could get the player to turned to the mouse...
You need to use Math.atan for that, everything is explained
here.
But I can't get the zombie to turn to the player , but the zombie follows the player...
Assuming that the instance name of the hero is "hero", use this code(change it to the real instance name if it's not the same.
onClipEvent(enterFrame){
if(this._x > _root.hero._x){
this._xscale = 100;
}
if(this._x < _root.hero._x){
this._xscale = -100;
}
}
8. How could I make the cursor(movieclip) play itself when it was clicked?
Paste this code:
onClipEvent(mouseDown){
this.play();
}
9. How could I do hit test and make the varible 'health' decrease when zombie touches the player?
Put this code on the zombies(assuming that the player's instance name is "hero"...)
onClipEvent(enterFrame){
if(this.hitTest(_root.hero)){
health -= 5; // feel free to change it.
}
}
10. How could I make the player unable to walk outside the movie but the zombie can walk in ?
For that you will need to post your movement code here.
11.What is the duplicate movieclip command?
Using duplicated MovieClips by Denvish .
(I got an flash MX 2004 in the language I don't know because I don't found english version of flash MX 2004 for download...)
Many flashers could use any language, it's not really important since AS is 1 language.
What do you mean by download it? The only legal version costs money, you could be banned for posting that.
More will come...
OH noes!
I think you've already asked enough questions, you're barely started and already need help with 11 different things??? =p
Bah, anyways, add me if you have more questions(do so even if you don't =p)
darktoaster@hotmail.com
-Toast? :)