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 1 of 3 1 2 3
short animation #342294
09/26/10 11:41
09/26/10 11:41
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline 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 Online
Senior Expert
Quad  Online
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: Quad] #342298
09/26/10 12:19
09/26/10 12:19
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
is it in a while loop?


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: short animation [Re: alibaba] #342363
09/26/10 19:30
09/26/10 19:30
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Yes it is nin a while loop.



Re: short animation [Re: Random] #342366
09/26/10 19:51
09/26/10 19:51
Joined: Nov 2008
Posts: 216
J
jane Offline
Member
jane  Offline
Member
J

Joined: Nov 2008
Posts: 216
how long is my.hit_by_player 1 ? the animation stoped when my.hit_by_player isnt 1.

Re: short animation [Re: jane] #342486
09/28/10 16:30
09/28/10 16:30
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Thanks it works know! grin



Re: short animation [Re: Random] #342491
09/28/10 17:00
09/28/10 17:00
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline 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 grin

Last edited by Random; 09/28/10 17:02.


Re: short animation [Re: Random] #342495
09/28/10 17:36
09/28/10 17:36
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
"Doese somebody knows wy I get an error?;"

What kind of error?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: short animation [Re: Superku] #342498
09/28/10 18:09
09/28/10 18:09
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Oh im sorry, I forrgot to wright that.
It`s an syntax error.



Re: short animation [Re: Random] #342505
09/28/10 19:21
09/28/10 19:21
Joined: Nov 2008
Posts: 216
J
jane Offline
Member
jane  Offline
Member
J

Joined: Nov 2008
Posts: 216
try this:

if((player.animblend == blend) || (player.animblend < attack_a) || (my.animblend > attack_f)) { my.hit_by_player = 0; }

Page 1 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