Hi, im currently coding my first small fighting game and im just wondering if a struct would be right for a moveset that can do more damage depending on the health...
like...
and then like, another struct...Code:struct DragonMovesSet { char MoveName[15]; int MoveDmg, MoveStam, MoveAc; } BigKick={ "Big Kick", 11, 8, 9 }; struct DragonMoveSet SpinningKick={ "Spinning Kick", 9, 12, 7}; struct DragonMoveSet ElbowToHead={ "Elbow To The Head", 4, 5,7}; struct DragonMoveSet Headbutt={ "Headbutt", 6, 9, 11};
and you only use moves from the second one when opponent is below 60 hp.. etc...Code:struct DragonMovesSetSrong { char MoveName[15]; int MoveDmg, MoveStam, MoveAc; } BigKick={ "Big Kick", 14, 8, 12 }; struct DragonMoveSet SpinningKick={ "Spinning Kick", 11, 12, 9}; struct DragonMoveSet ElbowToHead={ "Elbow To The Head", 6, 5,9}; struct DragonMoveSet Headbutt={ "Headbutt", 9, 9, 14};
is this how you would do it? and obviously the functions and stuff.
plz let me know. hugo.



LinkBack URL
About LinkBacks



