Gamestudio Links
Zorro Links
Newest Posts
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
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Ayumi, Akow, monk12), 1,413 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Calculating animation percent #103389
12/22/06 00:40
12/22/06 00:40
Joined: Dec 2006
Posts: 32
P
Paulo_Sousa Offline OP
Newbie
Paulo_Sousa  Offline OP
Newbie
P

Joined: Dec 2006
Posts: 32
Greets.
I've never been crazy about math, so I just can't find the reason of this:
animation_percent = (animation_percent*5*TIME)%100;

Why is the 5 there? It might be a dumb question, but I comment all this crazy commands at the end of the script. I just say change animation_percent to the variable you are using on ent_animate. But if I'm starting in C-Script, I want to understand it all!

Thanks


To the finest Game Designing tool I have ever seen!
Re: Calculating animation percent [Re: Paulo_Sousa] #103390
12/22/06 01:48
12/22/06 01:48
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline
Senior Member
Zelek  Offline
Senior Member

Joined: Feb 2002
Posts: 357
Florida
Hey, it's a good question to ask and a good attitude to have! It's confusing for everyone at first.

The reason for the 5 is to speed the animation up. It's a percent that goes from 0 to 100, and then loops back around (that's what the modulo operator does (%)). The 5 is just to speed how fast the animation goes from 0 to 100% (5 times faster).

Re: Calculating animation percent [Re: Zelek] #103391
12/22/06 22:09
12/22/06 22:09
Joined: Dec 2006
Posts: 32
P
Paulo_Sousa Offline OP
Newbie
Paulo_Sousa  Offline OP
Newbie
P

Joined: Dec 2006
Posts: 32
oh thanks. by the way, I am posting this in the right place? so, using Grimber's FPS tutorial, in AU, the running animation in cbabe is just stupid. I need to adjust that number untill it looks good, right?
Expect lots of posts by me

Paulo Sousa


To the finest Game Designing tool I have ever seen!
Re: Calculating animation percent [Re: Paulo_Sousa] #103392
12/22/06 22:21
12/22/06 22:21
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline
Senior Member
Zelek  Offline
Senior Member

Joined: Feb 2002
Posts: 357
Florida
If you are using the templates to animate cbabe, you can just right click on her, go to behavior tab, scroll down and bump up the walkswim_dist and runcrawl_dist about 10 times higher.

The way you suggested might work too, depends on how the code is set up.

Re: Calculating animation percent [Re: Zelek] #103393
12/22/06 23:23
12/22/06 23:23
Joined: Dec 2006
Posts: 32
P
Paulo_Sousa Offline OP
Newbie
Paulo_Sousa  Offline OP
Newbie
P

Joined: Dec 2006
Posts: 32
I wrote a new player function, wich currently has no bob or jump. So the animations were coded by Grimber/me Its funny when you code something without know what you are writing...

After you start, C-Script is easy. You first fix how to do stuff, they, slowly you start combining stuff. I once used a free Game design tool that had a built in language. It happened the same thing. But man when I see these C-Script codes at first... they scare the daylights outta me when I read whats before the code... its much easier!


To the finest Game Designing tool I have ever seen!

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