npc_citizen queries
Posted: Fri Feb 08, 2008 9:11 am
Ok. So here's the scenario: I've got to get the players to guide a group of citizens from point A to point B. At point A, the citizens are just hanging out doing nothing, until a trigger tells them to start following, at which point the citizens follow the nearest player until they get to point B. At point B, the citizens disengage from the player, and run into another room.
There are two main problems that arise, each method I have tried has solved only one of them:
1) The citizens don't follow the player
2) The citizens won't stop following the player
Currently, I've tried a couple of methods:
1) ai_follow entity. This worked really well for stopping the citizens from following the player - I just disabled the ai entity and the players stopped. Simple. Easy. The problem with it was that the citizens always got in the players way, and went running off to get themselves killed whenever possible. (Note: I DON'T want them to get themselves killed!)
2) Make them commandable. This worked really well for following - the citizens followed the player without getting in the way, and kept out of combat for the most part. Also had the advantage that you could tell them where to run to when the going got tough. The problem with it was that the citizens wouldn't STOP following the player.
At point A they follow the player with a "SetCommandable" input. I put a trigger_multiple at point B telling the citizens to do a scripted sequence to run into the next room, while at the same time triggering the citizens "remove from player squad" input. Immediately after the citizens were removed from the players squad, they were put back into it!! Is there a "SetUncommandable" input or it's equivalent for the npc_citizen?
Any help on this would be greatly appreciated. (Perhaps I'll let you name a citizen
)
There are two main problems that arise, each method I have tried has solved only one of them:
1) The citizens don't follow the player
2) The citizens won't stop following the player
Currently, I've tried a couple of methods:
1) ai_follow entity. This worked really well for stopping the citizens from following the player - I just disabled the ai entity and the players stopped. Simple. Easy. The problem with it was that the citizens always got in the players way, and went running off to get themselves killed whenever possible. (Note: I DON'T want them to get themselves killed!)
2) Make them commandable. This worked really well for following - the citizens followed the player without getting in the way, and kept out of combat for the most part. Also had the advantage that you could tell them where to run to when the going got tough. The problem with it was that the citizens wouldn't STOP following the player.
At point A they follow the player with a "SetCommandable" input. I put a trigger_multiple at point B telling the citizens to do a scripted sequence to run into the next room, while at the same time triggering the citizens "remove from player squad" input. Immediately after the citizens were removed from the players squad, they were put back into it!! Is there a "SetUncommandable" input or it's equivalent for the npc_citizen?
Any help on this would be greatly appreciated. (Perhaps I'll let you name a citizen
