View Full Version : [AS2] Finshing RPG Touches
Sythius
04-19-2009, 12:01 AM
Okay, I've uploaded my fla.
http://www.megaupload.com/?d=ANE4B26X
My problem is..
When you play it.. it works, haha...
but.. damage dealt can go into -numbers.. And I want it to stop on 0.
secondly.. is their a way to show the damage dealt to the player and enemy?
Y'know. Like in Final Fantasy, DragonFable, etc.
Any help will be greatly appreciated.. the show of damage done is more important though.. =)
thanks in advance.
scarce
04-19-2009, 02:14 AM
Okay, I've uploaded my fla.
http://www.megaupload.com/?d=ANE4B26X
My problem is..
When you play it.. it works, haha...
but.. damage dealt can go into -numbers.. And I want it to stop on 0.
secondly.. is their a way to show the damage dealt to the player and enemy?
Y'know. Like in Final Fantasy, DragonFable, etc.
Any help will be greatly appreciated.. the show of damage done is more important though.. =)
thanks in advance.
as far as the health, thats simple
whever you have the code that actually does the decreasing of health, add an if statement to the front of it
if(mc.health > 0){
//whatever code you have here to decrease health
}
as far as the damage dealt, if you want it to be like final fantasy, theres two ways, one i know, the other involves more scripting that would have to be learned and I have no use for that knowedge at this immediate time.
Part 1:
-create a movieClip
-inside the movieClip, make a dynamic text box, allow 3 characters.
-put 999 or whatever numbers in it to use for this animation
-animate it popping up then fading away
Part 2:
-Make sure it's not on the stage
-go to you library and right click it (apple click for mac) and go to linkage
-name it whatever, lets say damDelt
Now, I'm sure you have some variable of some sort that signifies how much damage is being reduced from whoevers health. Where that code is, you put something like this.
Part 3:
//Blah blah whatever you have here, if statement w/e
attachMovieClip("damDelt","damDelt",getNextHighestDepth)
damDelt._x = mc._x
damDelt._y = mc._y + mc._height/2
that should place it around the head area, i dunno, experiment with different variables for "damDelt._y = ?", it'll all depend on your set-up
Hope it works for ya
Sythius
04-19-2009, 09:21 AM
Okay..
I got the 0 one to work... thanks..
_root.bad = _root.bad-random(30);
if (bad<0) {
bad = 0;
}
I tried the damage one. .. And it did not work =/
But now I just realized something else I would like to have... Which I hoping would be easier.. =)
You see the coding for damage there above.. is their way to give it a range?...
like 20-50.. so it can only choose a random number between 20-50?
Thanks in advance.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.