Shop Mobile More Submit  Join Login
Alright, trying to post code on DA turned out horribly...

Here's EBF4's Target class on Pastebin:
pastebin.com/mtZVWPdC

Check out ma takeHit function.
Add a Comment:
 
:iconjpvr-150296:
JPVR-150296 Featured By Owner Jan 14, 2013
Haven't you tried using "int()" instead of "Math.floor()" ? because I think it has the same effect but is shorter...
Reply
:iconjpvr-150296:
JPVR-150296 Featured By Owner Jan 5, 2013
Hey Matt, I was wondering, when you put stuff like "hit:DamageObject" This means you have a class with that name or is it another function?...
Reply
:iconkupogames:
KupoGames Featured By Owner Jan 5, 2013
It's a class that holds a lot of different attack parameters.
Reply
:iconthatguywithacape:
ThatGuyWithACape Featured By Owner Apr 7, 2012  Hobbyist Artist
Hah, for a second there, I thought that was python.
Reply
:iconreaplingofdie:
ReaplingofDIE Featured By Owner Apr 6, 2012
... what... WAS that?
Reply
:iconguitar-kirby:
Guitar-Kirby Featured By Owner Apr 5, 2012  Hobbyist Filmographer
Well played, sir.
Reply
:iconzegman:
ZEGMAN Featured By Owner Apr 4, 2012  Student Artist
Lol nice takeHit function
Reply
:iconmacprodukshunz:
macprodukshunz Featured By Owner Apr 4, 2012  Student General Artist
I only understood about 5% of that. lol
Reply
:iconnonamegivenatall:
nonamegivenatall Featured By Owner Apr 4, 2012
Oh Godcat, max HP based damage statuses? This can't be good... (I don't mean that as in the code itself, obviously. I mean when it coems to actually facing htem when EBF 4 is done and out.)
Reply
:iconthealmanac:
TheAlmanac Featured By Owner Apr 4, 2012  Professional General Artist
its quite readable. as much as most python programs.
Reply
:iconningninja:
NingNinja Featured By Owner Apr 4, 2012  Student Digital Artist
Wow... THIS is coding!

And how much does this do?

Becoming a game designer would be a dream come true for me, I knew it would be alot of work, but never seen what actually goes on.
Reply
:iconeoncreature:
EonCreature Featured By Owner Apr 4, 2012  Hobbyist General Artist
WTF!?
Where you learned all of that!?!
Reply
:iconpolarcookie:
PolarCookie Featured By Owner Apr 4, 2012
So many ifs!

Nice code, the takeHit is a tad long.
I had no problem reading it though, and it seems to be correct.
Is there anything you are suspicious about you want us to verify?


I miss working with Flash and AS...
Reply
:iconevonyx3:
Evonyx3 Featured By Owner Apr 4, 2012
wow yeah nice.... very interesting (:
Reply
:icontesticular-disco:
Testicular-Disco Featured By Owner Apr 4, 2012  Hobbyist Photographer
I never bothered to ask this before, but what language do you use? I am only familiar with Ruby and a LITTLE Java...and it looks a bit like Java to me.
Reply
:iconhypersonic53:
Hypersonic53 Featured By Owner Apr 20, 2012  Hobbyist Traditional Artist
It does, but it's ActionScript 3.
Reply
:icontesticular-disco:
Testicular-Disco Featured By Owner Apr 20, 2012  Hobbyist Photographer
huh...I'll look into that...ty kind sir or madam for informing me :)
Reply
:iconhypersonic53:
Hypersonic53 Featured By Owner Apr 21, 2012  Hobbyist Traditional Artist
No problem. :D
Reply
:iconragnaul:
Ragnaul Featured By Owner Apr 3, 2012  Hobbyist General Artist
I feel like all that could have been so much shorter in AS2...

bbbaaaaawwwwwww
Reply
:iconkupogames:
KupoGames Featured By Owner Apr 4, 2012
it's verbose on purpose.
Reply
:iconthedarklord7:
TheDarkLord7 Featured By Owner Apr 3, 2012
Imma refer to this later as a guide...
Reply
:iconlifemouse:
Lifemouse Featured By Owner Apr 3, 2012  Hobbyist General Artist
Feel free to kill me for asking, but is this C++?
I am not good with program computer
Reply
:iconthedarklord7:
TheDarkLord7 Featured By Owner Apr 3, 2012
It's ActionScript 3, he said replied to a similar question earlier.
Reply
:iconlifemouse:
Lifemouse Featured By Owner Apr 3, 2012  Hobbyist General Artist
Thanks.
Reply
:iconthedarklord7:
TheDarkLord7 Featured By Owner Apr 3, 2012
No prob.
Reply
:iconthedarklord7:
TheDarkLord7 Featured By Owner Apr 3, 2012
he replied*
Accursed typos!
Reply
:iconblackmorecrest:
BlackmoreCrest Featured By Owner Apr 3, 2012  Hobbyist Traditional Artist
a wet status? I think Electric based spells are gunna hit harder!
Reply
:iconvaelvictus:
vaelvictus Featured By Owner Apr 3, 2012
This is really cool! :P I've made two battle systems and they've been rather interesting to code.

Question on why you need the "dead" flag? Why not just check if their HP is <= 0?
Reply
:iconkupogames:
KupoGames Featured By Owner Apr 3, 2012
it's more readable.
Reply
:iconvaelvictus:
vaelvictus Featured By Owner Apr 4, 2012
What's the memory usage like for a variable assigned just for flagging purposes?
Reply
:iconkupogames:
KupoGames Featured By Owner Apr 4, 2012
negligable.
Reply
:iconvaelvictus:
vaelvictus Featured By Owner Apr 6, 2012
I wonder if you'll say so few words when being code reviewed at a job. :} Do you work professionally?
Reply
:iconkupogames:
KupoGames Featured By Owner Apr 6, 2012
self employed.
Reply
:iconvaelvictus:
vaelvictus Featured By Owner Apr 7, 2012
That explains it. xD
Reply
:iconcognitio:
Cognitio Featured By Owner Apr 3, 2012  Hobbyist General Artist
man that is awesome almost 600 lines, I must submit to your skill. question: do you use java or C?
Reply
:iconkupogames:
KupoGames Featured By Owner Apr 3, 2012
...

ActionScript 3.
Reply
:iconcognitio:
Cognitio Featured By Owner Apr 3, 2012  Hobbyist General Artist
never heard of it haha thanks.
Reply
:iconvaelvictus:
vaelvictus Featured By Owner Apr 3, 2012
lol'd
Reply
:iconkernalgohd:
kernalgohd Featured By Owner Apr 3, 2012
Thanks for posting this! A long time ago I made a fairly simple flash game (not using the public vars, it was AS 2.0 and used the separate class files).
Its good to see that I was at least on the right track. its only a bunch of functions, variables, and else/if statements. A few commands that I don't quite understand, but I didn't really mess around in flash that long. I'm curious as to exactly how much code will be involved for your finished product
Reply
:iconkupogames:
KupoGames Featured By Owner Apr 3, 2012
A lot.
Reply
:iconfourswordsking:
FourSwordsKing Featured By Owner Apr 3, 2012
So I'm wondering what the whole:

public var maxHP: int;

thing is about. I mean, I know that it's supposed to be the base HP plus some more, but how is it applied? Through the items? Are you planning on equipment being a variable for health now?
Reply
:iconkupogames:
KupoGames Featured By Owner Apr 3, 2012
maxHp = base x bonus x equips x buff
Reply
:iconfourswordsking:
FourSwordsKing Featured By Owner Apr 3, 2012
Ah, I see. Well, that gives out a pretty well cleared up view on things.
Reply
:iconstevekb:
SteveKB Featured By Owner Apr 3, 2012  Hobbyist General Artist
I don't code in flash but that is some very nicely written code. Except the field for realHP ISN"T INDENTED COR//shot

but yeah very nice job good sir. especially for just one class as well.
Reply
:iconlava1o:
lava1o Featured By Owner Apr 3, 2012  Hobbyist General Artist
where did you start with your programming? what would you recommend for people who want to try or get into game programming or development? And is it hard to code in flash?
Reply
:iconkupogames:
KupoGames Featured By Owner Apr 3, 2012
Get a textbook or do a course on it.
Reply
:iconfourswordsking:
FourSwordsKing Featured By Owner Apr 3, 2012
I've had Flash for the past few years and I'm still trying to learn some more advanced principles for AS2.

...plus it is just a matter of if you're committed or not.
Reply
:iconmetallixnodensetsu:
MetallixNoDensetsu Featured By Owner Apr 3, 2012
I managed to get the gist of that without knowing the first thing about coding. I feel so smart. =)
Reply
:iconphantom-snow:
phantom-snow Featured By Owner Apr 3, 2012  Hobbyist Artist
me no understand this speak speak more gooder pleze
Reply
:icongodsplayingfield:
Godsplayingfield Featured By Owner Apr 3, 2012
...... feck this, i'll take your word for it that this works fine and wont even attempt at understanding any of it.
Reply
Add a Comment:
 
×

More from DeviantArt



Details

Submitted on
April 3, 2012
Link
Thumb

Stats

Views
46,262
Favourites
6 (who?)
Comments
54
×