Jump to content

[LE] Question: How to make guards stationary and salute on trigger


Recommended Posts

I've got a castle mod I'm working on, and want to place two guard NPCs at the front gate. I want three things from them:

 

  1. Each NPC should stand at a specific spot and not wander around. I want them to stand there 24x7, although I may have them switch out with alternate guards on a schedule
  2. When the player approaches the gate, I want them both to perform the salute animation (fist to chest) for X seconds, then go back to attention.
  3. While at attention, I'd like the guards to stand in a specific pose, holding their staff out at arm's length with one hand, holding a shield in the other.

The third item is fairly optional and would probably require a custom idle animation, but the first two seem perfectly doable... I just don't know how. I'm guessing an X-marker and AI restriction for the first one, then maybe a trigger + script for the second?

Link to comment
Share on other sites

This is how I know how, there might be a better way.

 

1. Place an X-marker heading where you want them to stand, don't link them, but place a travel package and in the travel to...choose the x-marker at 0.

In the package clear the checkboxes, you dont want them always saying idle crap like "can i help you" every 3 or 4 seconds

No quest conditions only their actor id's (you might need them to talk) so best give each guard a unique package.

 

2. Place another travel package, set up exactly like the one above, but this time you add conditions. The condition would be if the player distance is < = 64 to the subject (the actor)

In the package schedule is a papyrus box, on begin add the idle animation salute. It would look something like this.

 

myGuard01.PlayIdle(salute)

 

You will need to edit the new script generated, ignoring the error messages until you can add the properties of the idle and the actor.

To do this close the package and reopen it, select the script and choose the property tab next to it ignoring all the warnings. Then add the properties for the idle and the actor.

 

Rebuild the script in the package papyrus box.

 

Now when the player (conditions we added) get's equal to or less than 64 ingame units to the guard, he will salute.

You can do the exact same thing with dialogue via same conditions, but not only will he salute but say "General" or "My leige" or "Majesty" or whatever.

 

3. The poses would be another animation call, I don't know if there's anything default for this specific pose, you may have to go the fores idles in skyrim route with custom animation.

 

As an added thought, it would be best to make the guards a quest. Add them both (or others if you have many) as aliases. Set the quest to run at start and keep all their stuff in the quest.

packages, dialogue, etc.

 

In the actor remove any packages, and set all master packages to none.

If you add a package to the actor directly, make is a travel to self @ 0

Control them via the quest.

Edited by Rigmor
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...