rizzen Posted July 2, 2004 Share Posted July 2, 2004 well i just started scripting a few days ago and i have been playin around with this script which makes the npc "guard" follow the player when the player is sneaking and wander when he isnt. i have gotten it to work except for one small detail when i sneak the guard just turns and faces me and stays still until i stop sneaking in which case he goes back to wandering so i was wondering if anyone could take a look at my script and tell me what i did wrong thanks Begin guard_sneak_follow Short GuardWander If ( GuardWander == 0 )AiWander, 512, 0, 0,Set GuardWander To 1EndIf If ( GetPCSneaking == 1 )If ( GetLOS, player == 1 )AiFollow, player, 0, 0, 0, 0,EndIfEndIf If ( GetPCSneaking == 0 )If ( GetCurrentAIPackage == 3 )Set GuardWander To 0EndIfEndIf End Link to comment Share on other sites More sharing options...
Marxist ßastard Posted July 2, 2004 Share Posted July 2, 2004 Add a DoOnce to the AIFollow. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.