Page 2 of 2

Re: Animation problems

PostPosted: Sat Nov 22, 2008 10:31 pm
by BlarghNRawr
Code: Select all
if (hp>50) hp=50;
//replace hp with the name of the variable

if u used a variable thats the code , or for textnumber:
Code: Select all
if(hp.textNumber>50)hp.textnumber=50;
//replace hp with the actor name

Re: Animation problems

PostPosted: Sat Nov 22, 2008 10:37 pm
by Kurtz1515
Oh Cool! Thank you! :mrgreen:

one problem down and 3 to go... :(

Re: Animation problems

PostPosted: Sun Nov 23, 2008 2:43 pm
by Kurtz1515
sadly i have another problem... attacking, i feel like i don't have enough animations for naruto, i also don't understand how to make him attack. can any one look over the new naruto adventure file and my pics for naruto? i just need some example codes so i could look of and study.

Re: Animation problems

PostPosted: Sun Nov 23, 2008 7:37 pm
by jimmynewguy
1.lets say i have 40hp,(my max is 50) then i get a health item that heals hp by 20, my end results is have 60/50 hp, how can i fixe that?


draw actor-
Code: Select all
if(hp >= max hp)
hp = max hp;

then replace the variables
4.I tried a jumping thing that i found on these forums,where it reduces how much you can jump, but as long as i touch the floor once then i can just jump one more time even if im falling. Any idea?

collision finish-
Code: Select all
jump = 0;

edit- ditch the code ill do it myself

Re: Animation problems

PostPosted: Sun Nov 23, 2008 8:00 pm
by jimmynewguy
Here edited- :D

Few Changes = big difference

Re: Animation problems

PostPosted: Sun Nov 23, 2008 9:31 pm
by Kurtz1515
WOOOTT!! thanks, solves that problem,
i didn't like the music, well it was ok its just not really epic or adventurous, but it could be used if i was in a city or something :mrgreen:

Now if only i can get my fighting animation to work and hit only with his fist, for when he is facing left or right.

Re: Animation problems

PostPosted: Mon Nov 24, 2008 4:22 am
by skydereign
Are you talking about the actual animation direction, or the hitting of another character? I would use another actor for Naruto's attacks. And make the new actor's sprites, Naruto's fist, and during the keydown for an attack, it changes animation to the attack and an attack variable signifies dealing damage.

Re: Animation problems

PostPosted: Mon Nov 24, 2008 11:22 am
by DilloDude
You could look at my Samureye demo.
That includes basic platformer manoevering and attacking.