Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
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
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Newbie needs help #302730
12/21/09 18:05
12/21/09 18:05
Joined: Dec 2009
Posts: 1
Star Ocean
Incpektor_Khtulu Offline OP
Guest
Incpektor_Khtulu  Offline OP
Guest

Joined: Dec 2009
Posts: 1
Star Ocean
Hi! i have several problems with A7 and i would like to share them with you and hope to get help.
Well first of all i created a model in WED as player (he is animated with "stand" "walk" animation)but animation doesn't work at all , i use this script
///////////////////////////////

action player_move() // control the player on the client, move it on the server
{
var walk_percentage = 0;
while (1)
{
my.pan += (key_a - key_d)*5*time_step; // rotate the entity using [A],[D]
var distance = (key_w - key_s)*5*time_step;
c_move(me, vector(distance,0,0), NULL, GLIDE); // move it using [W],[S]
walk_percentage += distance;
ent_animate(me,NULL,0,0); // reset all bones
ent_animate(me,"walk",walk_percentage,ANM_CYCLE); // animate the entity
wait (1);
}
}
///////////////////////////////////////////
Player moves in the right directions ,but animation doesn't work ,the second problem with this model is that he goees throught walls and other models.
I tried to use default guard and wizard and they work perfect!
Help please

Re: Newbie needs help [Re: Incpektor_Khtulu] #303585
12/30/09 10:26
12/30/09 10:26
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
Code:
action player_move() // control the player on the client, move it on the server
{ 
var walk_percentage = 0;
while (1) 
{
my.pan += (key_a - key_d)*5*time_step; // rotate the entity using [A],[D]
var distance = (key_w - key_s)*5*time_step;
c_move(me, vector(distance,0,0), NULL, GLIDE); // move it using [W],[S]
walk_percentage += distance;
ent_animate(me,"walk",walk_percentage,ANM_CYCLE); // animate the entity
wait (1);
}
}


Try this one. Dont know why u reset all bones before animating? Its a while?!?

Simple animation while:
Code:
WHILE(1) {
  MY.SKILL1 += TIME;
  ENT_ANIMATE(ME, "walk", MY.SKILL1, ANM_CYCLE);
 WAIT(1);
 }



Mfg


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Newbie needs help [Re: Incpektor_Khtulu] #303589
12/30/09 11:08
12/30/09 11:08
Joined: Dec 2009
Posts: 74
Romania,Bucharest
Ted22 Offline
Junior Member
Ted22  Offline
Junior Member

Joined: Dec 2009
Posts: 74
Romania,Bucharest
Do u named the frames of ur model in MED?

Re: Newbie needs help [Re: Ted22] #303590
12/30/09 11:32
12/30/09 11:32
Joined: Dec 2009
Posts: 74
Romania,Bucharest
Ted22 Offline
Junior Member
Ted22  Offline
Junior Member

Joined: Dec 2009
Posts: 74
Romania,Bucharest
oh,i found the soulution...try this:
var walk_percentage = 0;

..............................

action player_move() // control the player on the client, move it on the server
{
while (1)
{
my.pan += (key_a - key_d)*5*time_step; // rotate the entity using [A],[D]
var distance = (key_w - key_s)*5*time_step;
c_move(me, vector(distance,0,0), nullvector, GLIDE); // move it using [W],[S]
walk_percentage += distance;
ent_animate(me,"walk",walk_percentage,ANM_CYCLE); // animate the entity
walk_percentage += 2 * time_step;
if (key_any == 0)
{
ent_animate(me,NULL,0,0); // reset all bones
}
wait (1);
}
}

////////////////////// ok,so ill explain what i did.Don't use c_move(me, vector(distance,0,0), NULL, GLIDE); use nullvector instead of NULL;
///////////////////// if (key_any == 0) means that if no key is pressed will do{what is here}
////////////////////walk_percentage += 2 * time_step; <- use this under ur ent_animate to define the speed of ur animation; i guess this is all laugh Good luck!reply if still got problems!

Last edited by Ted22; 12/30/09 11:35.

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