Page 1 of 1

making my allies go back on path

Posted: Sat May 05, 2007 2:38 am
by darksmaster923
hey yall, im using a heavily modded perfectai.s script for my allies and enemies. The problem is, is that after attacking an enemy, they either stay in that spot or keep attacking the dead body. any help?

and how do you make them go back to their first script point

Posted: Sun May 06, 2007 6:30 pm
by Juutis
Check if the enemy is dead and then go back to the order in which the pawn was before attacking :arrow: Problem solved! :P

how do you make them go back to their first script point
You could store the scriptpoint in a variable and then whenever you want the pawn to go back there, you could read the variable.

Posted: Mon May 07, 2007 6:45 am
by darksmaster923
i already have the check for enemies

how do you make bots randomly move

Posted: Tue May 08, 2007 7:03 pm
by Juutis
Randomly move? A little explanation would be nice. :wink:

Basically, just pick a random direction with random() command and set it to be ideal_yaw, then use ChangeYaw() to turn and walkmove() to go there.

Posted: Wed May 09, 2007 12:24 am
by darksmaster923
okay, maybe i chose the wrong word. can i make movement like in the genesis3D demo game thing

Posted: Sat May 12, 2007 10:31 am
by Juutis
I have no clue of what you're talking about. :roll:

You know, you could explain what you want to do rather than saying "I want it to be like in that game". Everyone may not have played every game you have. :wink:

Posted: Sat May 12, 2007 8:36 pm
by darksmaster923
oh sorry, dash that i sorta did that. but my pawns still attack even when the pawn is dead(im using the respawn pawn thats added to perfectai so that might be a problem) and when i get the attribute of the targetpawn it crashes