Author Topic: Bots Having More Than One Attack  (Read 507 times)

The last one of these kind of questions (hopefully.)

Is it possible/how would it work?
And how could you set an attack to have a 100/90/80/70/60/etc. percent of happening?

For the chance, do the following
Code: [Select]
if(getrandom(0,100) < 40){
//do attack
}

Where 40 is the percent.

For multiple attacks, the bot would simply mount a new weapon and fire.

Not a weapon, like a zombie attack.

For example, if a bot has a punch and kick animation, how would you make it so that the bot has a 50% chance of kicking?

For the chance, do the following
Code: [Select]
if(getrandom(0,100) < 40){
//do attack
}else{
//do other attack
}

Where 40 is the percent.


You'll have to find the zombie attack code. It works through oncollision.

Thanks, that helps.

Although I have absolutely no clue on how to use the zombie attack code. Could you help script?

I think your in over your head with this. Your asking people to sorta just do it for you, so I think you should move this into suggestions and requests or pm advanced scripters to see if they're free. Many people are working on mods so it will be pretty tough.

We need someone to script that is good with bots.
Know any people that aren't busy?