making my allies go back on path

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

making my allies go back on path

Post 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
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post 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.
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

i already have the check for enemies

how do you make bots randomly move
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post 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.
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

okay, maybe i chose the wrong word. can i make movement like in the genesis3D demo game thing
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post 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:
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post 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
Herp derp.
Post Reply