SOURCE FILE AND HD VIDEO WILL BE AT...
http://adobeflashtutorials.tk/
In this tutorial I will show you how to make your character have a health bar and how to make you lose health when you hit an enemy.
--------ACTIONSCRIPT--------
On the healthbars actionscript layer
++++++++++++++++
onEnterFrame = function(){
gotoAndStop(_root.hpvar);
}
++++++++++++++++
On the enemy
++++++++++++++++
onClipEvent (load) {
_root.score = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.toon.toonattack.toonrange)) {
this.gotoAndPlay(2);
_root.score += 1;
}
if (this.hitTest(_root.toon._x, _root.toon._y, true)) {
_root.hpvar -= 1;
}
}
++++++++++++++++
And on the toon
++++++++++++++++
onClipEvent(load){
_root.current_wep = 1
_root.hpvar = 100
}
++++++++++++++++
Source [will work on this soon]
can u make a tutorial of health bar in AS3 ??? i really cant do it on AS3...
miggsy13 7 months ago in playlist Visual Media Arts
@Henrik091 fucking noob troll. at least troll hard and don't use asterisks. asterisks are retard. And it's more useful in the world to know how to make a Flash game than being verbally agressive in the internet.
KroltanMG 7 months ago
@ttaxlu hitTest does that, i guess.
KroltanMG 7 months ago
Great tutorial, thanks!
Zawazuki 7 months ago
Here the centerpoints need to meet for the hp_bar to get down. how do you do so that it only needs to touch????????
answer plz
ttaxlu 2 years ago
??????
josebermudez1996 2 years ago
fucking troll...
TheJakel9 2 years ago
ok his a nerd and your retarded so whats worst being retarded....
josebermudez1996 2 years ago
fu*king nerd
Henrik091 2 years ago