Gamestudio Links
Zorro Links
Newest Posts
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
folder management functions
by 7th_zorro. 04/15/24 10:10
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
SGT_FW
by Aku_Aku. 04/10/24 16:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, Quad), 373 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Animations on multitasking, based on S. Hawking #134864
06/09/07 03:54
06/09/07 03:54
Joined: Sep 2006
Posts: 148
Ireng Offline OP
Member
Ireng  Offline OP
Member

Joined: Sep 2006
Posts: 148
Stephen Hawking emailed me the other day with this email:
"Hey, Ireng!
Just emailed to remember you how cool you are.
And to ask you a lil' question.
You see, I'm making a small game in 3dgamestudio. No, seriously. Got bored of white holes and radiaton vortexs. And now my character in-game is animated in a While loop that when one of his skills is set to 1, it will play a different animation. It's like this:

Main action ----> Animate_me() // it makes the char run "stand" anim
When attacking ---- > skill=1 ----> Animate_me() // it makes the char run "attack" anim

The two different animations are played accordingly to the skill "Activity": if 0, it's "stand". If 1, it's "attack".

Code:
 function Animate_Me()
{
while(1)
{
// ANIMATION
MY._biped01_anim_dist+=time*7;
if (my._biped01_anim_dist>100) {MY._biped01_anim_dist=0;}

if(my.actividad==1) // Fire sequence
{
while(my.activity==1)
{
my.attack_speed=1;

if(my.activity==1)&&(my.attack_speed<=60)
{
MY._biped01_anim_dist+=time*3;
ent_animate(me,"attack",MY._biped01_anim_dist,ANM_CYCLE);
my.attack_speed+=time;
}
if(my.attack_speed>60){my.attack_speed=0;}
wait(1);
}
}

else
{
if (my.is_cMoveMode==is_cStopped) {ent_animate(me,"stand",MY._biped01_anim_dist-11*time,ANM_CYCLE);}
else{ent_animate(me,"run",MY._biped01_anim_dist,ANM_CYCLE);
}
}
wait(1);
}
}



But this code doesn't work. At all. I've tripled checked that the code is actually active using breakpoints, and it is, but it's run way too fast and I dunno how to control it. Any ideas?
Yours,
Stephen Hawking"

Guess I should help this laddie.


"When the battlefield is under total control, war becomes routine." Old Snake
Re: Animations on multitasking, based on S. Hawkin [Re: Ireng] #134865
06/09/07 18:11
06/09/07 18:11
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Why are you sullying Stephen's good name while simultaneously asking that other users solve your easily solvable 3DGS questions? It's not a truckin riddle. The solution is obvious to many. Yes, I know you are kidding, but still I think you shouldn't lie about Stephen's involvement. Your ploy is 'dirty'.

Re: Animations on multitasking, based on S. Hawkin [Re: testDummy] #134866
06/09/07 18:19
06/09/07 18:19
Joined: Sep 2006
Posts: 148
Ireng Offline OP
Member
Ireng  Offline OP
Member

Joined: Sep 2006
Posts: 148
Ok, but the problem I face is real. And I can't seem to solve it, really.


"When the battlefield is under total control, war becomes routine." Old Snake
Re: Animations on multitasking, based on S. Hawkin [Re: Ireng] #134867
06/09/07 18:26
06/09/07 18:26
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Well why not just set your activity skill to the name of the animation which should be played?
Code:

my.activity = "stand";
//or:
my.activity = "walk";


Yes, this is possible.

Re: Animations on multitasking, based on S. Hawkin [Re: Xarthor] #134868
06/09/07 18:57
06/09/07 18:57
Joined: Sep 2006
Posts: 148
Ireng Offline OP
Member
Ireng  Offline OP
Member

Joined: Sep 2006
Posts: 148
Dude, that seems... great. I never thought of that.
I'm currently trying to implement it.
Thanks in advance!


"When the battlefield is under total control, war becomes routine." Old Snake

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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