Thursday 30 April 2009

Added features: Death

Death



//Code on thing you want to kill the player.
onClipEvent(load){
this.frm = "221";
}

//Code in thing you want to kill the player.
onClipEvent(load){

onEnterFrame = function(){

var hit = this.hitTest(_root.player);

// Start Playing
if(hit)

Then
(_root.gotoAndPlay(frm));


}

//

This works in a simolar way to the soundboxes lots of diffrent death boxes that send you to diffrent frames depending on what "frm" you direct it to.

to make a respown point that you will redirect flash to, create two frames one with a blank frame where the character was and another with the character placed where you want him to respawn.

No comments: