AI: Follow?

Discussion in 'Fallout Tactics Modding' started by Hes Vital, Sep 8, 2005.

  1. Hes Vital

    Hes Vital First time out of the vault

    28
    Aug 28, 2005
    What exactly does this AI mode does?
     
  2. requiem_for_a_starfury

    requiem_for_a_starfury So Old I'm Losing Radiation Signs

    Apr 3, 2003
    It'll make an npc follow another npc. Useful if you've got a guard patrolling with a dog following, the dog will keep pace with the guard but if you've got directional waypoints set up the dog won't turn to the direction etc.

    For example you have a series of waypoints tracing a route around a building, but in front of the building's doors you place a directional waypoint facing the door, set to pause and magic hands (or open door for that matter) so the guard appears to routinely stop and check if the doors are locked. If they have a dog following them the dog won't turn and do the magic hands (scratching it's ears). Which it would do if it was just set to follow the waypoints, it would look a little odd, having a dog checking the doors after all. :)
     
  3. Hes Vital

    Hes Vital First time out of the vault

    28
    Aug 28, 2005
    Does it work with an Actor following an Actor controled by human?

    Did you get it? I am an human and the dog is following me.
     
  4. Phil the Nuka-Cola Dude

    Phil the Nuka-Cola Dude Sonny, I Watched the Vault Bein' Built!

    Jul 9, 2004
    So it would be possible to make an NPC do a perimeter check, and if a door is unlocked that is supposed to be locked, you could set him to sound an alarm alerting the other NPCs on his team?
     
  5. requiem_for_a_starfury

    requiem_for_a_starfury So Old I'm Losing Radiation Signs

    Apr 3, 2003
    Nope it'll only work with an npc following an npc.

    If you want an npc to follow you without them being under your control give your player a tagname, set up a waypoint and tag it something like player_wp. Then set up a preserved trigger so that the waypoint always moves to the player, so then if you want someone to follow the player just have them use the waypoint player_wp.

    Yes, not sure about them using an alarm but you could use the force speech command so a windowed text comes up with the actor shouting a warning like in Freeport.

    If instead of magic hands you use the open door option on the waypoint, then if the door is unlocked they'll open it. You can then set a trigger that if the actor can see a door and the object script state is set so the door is open then have them raise an alarm.

    So set up you waypoints and in front of the door have a directional waypoint pointing at the door. Set it to pause for a couple of seconds and set the action to open door. Then set up a small zone around the waypoint in front of the door.

    Your trigger would need to be something like;

    condition
    player x has more than 0 alive in zone y
    object script state of door z is ticked

    action
    unit player x will use speech node a
    B wait 1
    play wav alarm.wav

    If the door is set to sensor open you don't need an action on the waypoint, just pause the actor for a couple of seconds.
     
  6. Hes Vital

    Hes Vital First time out of the vault

    28
    Aug 28, 2005
    Are you sure that it does work? Because the dog goes to the first waypoint position, I moved the waypoint to where the human is, the waypoint moved(I moved a flag to where the waypoint was) but the dog didnt go to where the waypoint was, the dog moved to the first waypoint position.
     
  7. requiem_for_a_starfury

    requiem_for_a_starfury So Old I'm Losing Radiation Signs

    Apr 3, 2003
    Yes, it works, the dog will even go off and attack an opponent and then return to your side (as long as it can see you).

    You just need the one waypoint always moving to the player.

    What movement priority have you given the dog? You'll need to set it's movement priority over 5, higher if you have always/smart run selected in the options.
     
  8. Hes Vital

    Hes Vital First time out of the vault

    28
    Aug 28, 2005
    I believe in you when you say that it works, but there is something that I am doing, because with me it isnt working, I did put the entite capture flag, and then did use in the tag Debug, I put an waypoint too, taged with player_wp, then using the action Move Unit, I moved the player_wp to where the human is at, then I moved the Debug to where the player_wp is at, the flag is always where the human is but the dog moves to the first waypoint position, the AI is all default(expect that I change to use waypoints).
    What is wrong? :shock:
     
  9. requiem_for_a_starfury

    requiem_for_a_starfury So Old I'm Losing Radiation Signs

    Apr 3, 2003
    Presumably you made the trigger that moves the flag preserved, did you make the trigger that sets the dog to the waypoint preserved?

    If not it'll only move the once.
     
  10. Hes Vital

    Hes Vital First time out of the vault

    28
    Aug 28, 2005
    What? I should make a trigger that set the waypoint?
    *Few time later*
    Hm, it did work.
    But the dog stay waiting for something like 1 or 2 seconds, is there anyway to fix it.(The pause is in 0)
     
  11. requiem_for_a_starfury

    requiem_for_a_starfury So Old I'm Losing Radiation Signs

    Apr 3, 2003
    Not that I know of, there was always some lag.

    We've had the same problem with moving light entities to the waypoint (for having a torch equipped) it takes a few seconds for the waypoint to move and catch up with the player all the time.
     
  12. Hes Vital

    Hes Vital First time out of the vault

    28
    Aug 28, 2005
    Thanks,
    Now, thanks to you, I am going to make my new map, a (I think) original map, soon avaliable here.