Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,280 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ent_animate #67764
03/22/06 18:21
03/22/06 18:21
Joined: Feb 2003
Posts: 211
Unna
F
Freddy_dup1 Offline OP
Member
Freddy_dup1  Offline OP
Member
F

Joined: Feb 2003
Posts: 211
Unna
Hello,

when I use „ent_animate” the entity returns after
“var percent” is 100 to its first frames.
If I place many enemies in my level they aren’t stopping
their die frames until all enemies got no my._health left.
They die, stop, die again and when I killed all enemies
they die and then return to their first fame and stop.
Why? I use my.skill2 as the “var percent” so they
should be independent.
And why don’t they stop at their last die frame?

The same strange effect can be found at my gun.
It moves and then it moves the first frame again
(but the “var percent” is limited to 100 and then the
animation should stop)

What’s wrong with ent_animate the way I try to use it?

Code:
action enemy(){
my._health=100;
while(my._health>0){
wait(1);}
my.skill2=0;
while(my.skill2<100){my.skill2+=5*time;if(my.skill2>100){my.skill2=100;}
ent_animate(me,"die",my.skill2,ANM_cycle);wait(1);}
my.passable=ON;}



My gun uses vertex animations and my enemy uses bones.

Re: ent_animate [Re: Freddy_dup1] #67765
03/22/06 18:31
03/22/06 18:31
Joined: May 2005
Posts: 338
Brasil
Filipe Offline
Senior Member
Filipe  Offline
Senior Member

Joined: May 2005
Posts: 338
Brasil
if the animation is not cyclic (like walking or running), you shouldn't use anm_cycle... that will make the last frame of the animation blend with the first, that's why it's not stopping in the last frame.

but the problem of having to kill all of the enemies, i don't know...

Re: ent_animate [Re: Filipe] #67766
03/22/06 18:55
03/22/06 18:55
Joined: Feb 2003
Posts: 211
Unna
F
Freddy_dup1 Offline OP
Member
Freddy_dup1  Offline OP
Member
F

Joined: Feb 2003
Posts: 211
Unna
Thanks!
ent_animate(me,"die",my.skill2,null);
that stops the enemies going back to the first frame.

But they still seem to be not independent.
I have to kill all to stop them from shaking and starting
to walk again.

Re: ent_animate [Re: Freddy_dup1] #67767
03/22/06 19:43
03/22/06 19:43
Joined: May 2005
Posts: 338
Brasil
Filipe Offline
Senior Member
Filipe  Offline
Senior Member

Joined: May 2005
Posts: 338
Brasil
hm, i remembered there's a bug related to bones animation, when several entities use the same mdl file.
as i remeber, you could solve this bug by setting the u and v parameters of the entities to anything != 0...
try putting this in the enemies action:
Code:

action enemy(){
my.u = 0.01;
my.v = 0.01;
etc...



Re: ent_animate [Re: Filipe] #67768
03/22/06 20:31
03/22/06 20:31
Joined: Feb 2003
Posts: 211
Unna
F
Freddy_dup1 Offline OP
Member
Freddy_dup1  Offline OP
Member
F

Joined: Feb 2003
Posts: 211
Unna
That works!
What a strange bug!


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