Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by NeoDumont. 07/15/26 16:38
Z9 getting Error 058
by jcl. 07/15/26 15:07
Zorro version 3.0 prerelease!
by madpower2000. 07/14/26 20:11
Accepting new programming clients
by AndrewAMD. 07/14/26 19:32
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 07/09/26 13:16
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (AndrewAMD, NeoDumont, madpower2000, 1 invisible), 2,811 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Random Animation #129588
05/12/07 23:22
05/12/07 23:22
Joined: Jul 2006
Posts: 28
B
burning_devil Offline OP
Newbie
burning_devil  Offline OP
Newbie
B

Joined: Jul 2006
Posts: 28
Hi, I am making a fighting game, and for some reason I can get everything correct besides basic AI like random attacks. I have a character that has 4 different animation attacks(punch,kick,high punch,and low kick)Can anyone please help me understand how to use random attacks like kick or punch in a random event.

Re: Random Animation [Re: burning_devil] #129589
05/12/07 23:26
05/12/07 23:26
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Use random

define attack_punch,0;
define attack_kick,1;
define attack_highpunch,2;
define attack_lowkick,3;

var ran = int(random(4));

if(ran == attack_punch) {punch();}
if(ran == attack_kick) {kick();}
if(ran == attack_highpunch) {highpunch();}
if(ran == attack_lowkick) {lowkick();}


Gamestudio download | 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