Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: short animation [Re: jane] #342865
10/01/10 16:48
10/01/10 16:48
Joined: Nov 2008
Posts: 216
J
jane Offline
Member
jane  Offline
Member
J

Joined: Nov 2008
Posts: 216
here the fixed version, testet and is work.

action enemy_dummy()
{
set(my,SHADOW);
my.entity_type = 2;
my.emask |= ENABLE_SCAN;

while(1)
{
if(my.hit_by_player != 1)
{
my.skill1 += 3*time_step;
my.skill1 %= 100;
ent_animate(me,"stand",my.skill1,ANM_CYCLE);
}

if(my.hit_by_player == 1)
{
if(player.animblend == attack_a)
{
my.skill1 += 3*time_step;
ent_animate(me,"hit_a",my.skill1,ANM_CYCLE);
my.skill1 %= 100;
my.move_x = player.move_x;
my.move_y = player.move_y;
c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE);
if((player.animblend == blend) || (player.animblend < attack_a) || (my.animblend > attack_f))
{
my.hit_by_player = 0;
}
}
if(player.animblend == attack_b)
{
my.skill1 += 3*time_step;
ent_animate(me,"hit_b",my.skill1,ANM_CYCLE);
my.skill1 %= 100;
my.move_x = player.move_x;
my.move_y = player.move_y;
c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE);
if((player.animblend == blend) || (player.animblend < attack_a) || (my.animblend > attack_f))
{
my.hit_by_player = 0;
}
}
if(player.animblend == attack_c)
{
my.skill1 += 3*time_step;
ent_animate(me,"hit_c",my.skill1,ANM_CYCLE);
my.skill1 %= 100;
my.move_x = player.move_x;
my.move_y = player.move_y;
c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE);
if((player.animblend == blend) || (player.animblend < attack_a) || (my.animblend > attack_f))
{
my.hit_by_player = 0;
}
}
if(player.animblend == attack_d)
{
my.skill1 += 3*time_step;
ent_animate(me,"hit_d",my.skill1,ANM_CYCLE);
my.skill1 %= 100;
my.move_x = player.move_x;
my.move_y = player.move_y;
c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE);
if((player.animblend == blend) || (player.animblend < attack_a) || (my.animblend > attack_f))
{
my.hit_by_player = 0;
}
}
if(player.animblend == attack_e)
{
my.skill1 += 3*time_step;
ent_animate(me,"hit_e",my.skill1,ANM_CYCLE);
my.skill1 %= 100;
my.move_x = player.move_x;
my.move_y = player.move_y;
c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE);
}
if(player.animblend == attack_f)
{
my.skill1 += 3*time_step;
ent_animate(me,"hit_f",my.skill1,ANM_CYCLE);
my.skill1 %= 100;
my.move_x = player.move_x;
my.move_y = player.move_y;
c_move(my, nullvector, my.move_x, USE_BOX | IGNORE_PASSABLE | GLIDE);
if((player.animblend == blend) || (player.animblend < attack_a) || (my.animblend > attack_f))
{
my.hit_by_player = 0;
}
}
}
if((player.animblend == blend) || (player.animblend < attack_a) || (my.animblend > attack_f))
{
my.hit_by_player = 0;
}
wait(1);
if(((player.animblend >= stand) && (target_enemy == me) && (player_lock_on == 0))
&& ((player.animblend < attack_a) || (player.animblend > attack_f)))
{
target_enemy = NULL;
}
if((target_enemy == my) && (vec_dist(my.x, player.x) > 500))
{
target_enemy = NULL;
}
wait(1);
}
}

Re: short animation [Re: jane] #342945
10/02/10 11:49
10/02/10 11:49
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
"the fixed script is in the next post"

Nope this is the fixing script grin
It works everything now!
Thanks bro!



Page 3 of 3 1 2 3

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1