Monthly Archive for February, 2008

A Really Good HitTest To Use…HitTest An Object All Around

Hello!

I learned how to make this during an expirement I was doing.

Step 1 ~ Make an MC (movieclip) and call it “walls”.

Step 2 ~ Make another MC and call it “guy”.

Step 3 ~ Paste this code to it.

_______________________________________________________________

onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
this._y -= 3;
}else if(Key.isDown(Key.DOWN)){
this._y += 3;
}
if(Key.isDown(Key.LEFT)){
this._x -= 3;
}else if(Key.isDown(Key.RIGHT)){
this._x += 3;
}
if(_root.wall.hitTest(_x+(_width/2),_y,true)){
this._x -= 3;
}
if(_root.wall.hitTest(_x-(_width/2),_y,true)){
this._x += 3;
}
if(_root.wall.hitTest(_x,_y+(_height/2),true)){
this._y -= 3;
}
if(_root.wall.hitTest(_x,_y-(_height/2),true)){
this._y += 3;
}
}

_______________________________________________________________

Wala! There you go. Tell me what you think and tell me what you made with it…I would love to post it here! Bye! :D

A Timer For Flash

How To…Or Should I Say Here Is? Anyways, Here Is A Flash Timer:

Flash Timer

Its really handy when making games. For example, you could be making a motorcycle game (I don’t like those kind of games, just an example), and you made the race with other people, but still, you need the Time Attack part…so, use this timer!

I really apreciate this timer, I got it from Blink (BlinkOK)…You might know him. Really kind person, he is the one helping me with the Dog Chase game. I barely know the things in that game…So I am thanking him!

Please leave comments. Just take a minute away to leave comment to thank blink. Thanks.

Hope you like the timer! Bye!

EmanueleFeronato.com


Blog.0tutor.com

blog.0tutor.com, is a very useful site.

Click on the link and check some tutorials, has nice special effects.

I have been trying to see if I can advertise on his site, the owner of the site’s name is Bob. View his site and leave some comments about it.

 EDIT:

He said yes! So, probobly by 6:00 you will be seeing my advertisment! Thank you Bob!

Go To A Frame When … Happens

Lets get right to the point…I LIKE CHOCKOLATE!!! Na! just kittin’ Here is the real point.

Step 1 ~ “When a movieclip (guy) hits another movieclip (dressingroom), go to frame 10″, if thats what you want, type this into the guy.

_____________________________________________________________________________________

In Frame: 

if(guy.hitTest(wall)){
 gotoAndStop(2);
}

In Movieclip (guy):

TBC

_____________________________________________________________________________________

Step 2 ~ Lets say you have a game where you can fight, if the enemy’s health is all the way down, then put this code inside the frame. Remember, you have to have a variable called enemyHealth.

______________________________________________________________________________________

if(enemyHealth == 0){
  gotoAndStop(2);
}

______________________________________________________________________________________

Step 3 ~

The Code was taken from ww.AwestyProductions.com

Thank You Awesty! :D