Gamestudio Links
Zorro Links
Newest Posts
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
NOMAX undeclared identifier.
by Petra. 01/09/26 21:12
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Quad), 2,803 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joe_kane, Namitha_NN, Syndrela, agasior, mosfet
19189 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