|
|
short animation
#342294
09/26/10 11:41
09/26/10 11:41
|
Joined: Feb 2010
Posts: 886
Random
OP
User
|
OP
User
Joined: Feb 2010
Posts: 886
|
So I got a little problem. when I (the player) hits the enemy, the enemy should animate short the block animation;
...... if(my.hit_by_player == 1) { my.skill1 += 3*time_step; if (my.skill1 > 100) my.skill1 -= 100; ent_animate(me,"block",my.skill1,ANM_CYCLE); .....
Doese anybody knows what I did wrong?
|
|
|
Re: short animation
[Re: Random]
#342296
09/26/10 11:59
09/26/10 11:59
|
Joined: Oct 2007
Posts: 5,209 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
|
resetting hit_by_player to 0 before my.skill1 gets to 100?
3333333333
|
|
|
Re: short animation
[Re: alibaba]
#342363
09/26/10 19:30
09/26/10 19:30
|
Joined: Feb 2010
Posts: 886
Random
OP
User
|
OP
User
Joined: Feb 2010
Posts: 886
|
Yes it is nin a while loop.
|
|
|
Re: short animation
[Re: Random]
#342491
09/28/10 17:00
09/28/10 17:00
|
Joined: Feb 2010
Posts: 886
Random
OP
User
|
OP
User
Joined: Feb 2010
Posts: 886
|
And know the last questin. Doese somebody knows wy I get an error?; .......... while(1) { my.skill1 += 3*time_step; if (my.skill1 > 100) my.skill1 -= 100; ent_animate(me,"stand",my.skill1,ANM_CYCLE); wait(1); if(my.hit_by_player == 1) { if(you.animblend == attack_a) { my.skill1 += 3*time_step; if (my.skill1 > 100) my.skill1 -= 100; ent_animate(me,"hit_a",my.skill1,ANM_CYCLE); my.move_x = player.move_x; my.move_y = player.move_y; c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE); wait(-0.5); if(you.animblend == attack_b) { my.skill1 += 3*time_step; if (my.skill1 > 100) my.skill1 -= 100; ent_animate(me,"hit_b",my.skill1,ANM_CYCLE); my.move_x = player.move_x; my.move_y = player.move_y; c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE); wait(-0.5); if(you.animblend == attack_c) { my.skill1 += 3*time_step; if (my.skill1 > 100) my.skill1 -= 100; ent_animate(me,"hit_c",my.skill1,ANM_CYCLE); my.move_x = player.move_x; my.move_y = player.move_y; c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE); wait(-0.5); if(you.animblend == attack_d) { my.skill1 += 3*time_step; if (my.skill1 > 100) my.skill1 -= 100; ent_animate(me,"hit_d",my.skill1,ANM_CYCLE); my.move_x = player.move_x; my.move_y = player.move_y; c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE); wait(-0.5); if(you.animblend == attack_e) { my.skill1 += 3*time_step; if (my.skill1 > 100) my.skill1 -= 100; ent_animate(me,"hit_e",my.skill1,ANM_CYCLE); my.move_x = player.move_x; my.move_y = player.move_y; c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE); wait(-0.5); if(you.animblend == attack_f) { my.skill1 += 3*time_step; if (my.skill1 > 100) my.skill1 -= 100; ent_animate(me,"hit_f",my.skill1,ANM_CYCLE); my.move_x = player.move_x; my.move_y = player.move_y; c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE); wait(-0.5); if(player.animblend == blend || player.animblend < attack_a || my.animblend > attack_f) my.hit_by_player = 0; ..........Im realy a noob when it goes to animations... Thanks for the future. You guys are realy a help 
Last edited by Random; 09/28/10 17:02.
|
|
|
Re: short animation
[Re: Superku]
#342498
09/28/10 18:09
09/28/10 18:09
|
Joined: Feb 2010
Posts: 886
Random
OP
User
|
OP
User
Joined: Feb 2010
Posts: 886
|
Oh im sorry, I forrgot to wright that. It`s an syntax error.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|