Jump to content
Sign in to follow this  
Aelle

Ready, Aim, Fire! - A guide to setting up ranged NPCs

Recommended Posts

In this guide, I'll teach you a super fast and easy method to set up a ranged NPC to fire their weapon in intervals that seem organic.

 

First, spawn in the NPC you want to be your ranger.

Next, you're going to want to do is select your ranged NPC and create 5 waypoints using the command '.waypoint add'

Specifically, you're going to walk backwards as you do so, creating 5 separate waypoints in a line.

Once this is done, you're going to want to see those waypoints so we can modify them using '.waypoint show'.

You should now see a line of 6 tiny replica NPCs of your select NPC idly walking on the spot. These are your waypoints, which you can now select and modify.

 

We're now going to go over these waypoints and what we'll need to do to edit each one by selecting them.

 

Waypoint 0 = This waypoint will appear as a ?? boss under your NPCs feet. On this waypoint, we're going to want to set our ready state. As these are riflemen, I'm going to use the STATE_READYRIFLE (214) emote and set it by clicking on waypoint 0 and typing '.waypoint mod emote 214'

You can use '.lo emote' followed by a keyphrase to find any emote in the game you're looking for this way.

 

Waypoint 1, 2 & 3 = On these waypoints, we're going to set our delays between each shot. For waypoint 1, we're going to want to set a nice base integer for a delay between firing. 3 seconds should do, so we're going to select waypoint 1 and type '.waypoint mod delay 3000.'

Every 1000 is a second.

Next, we're going to be adding possible randomized delays between shots, thus potentially delaying the time between your character firing further. To do this, we'll be selecting waypoints 2 and 3 and adding far shorter delays for each of these waypoints. I'll be adding 2 seconds for waypoint 2 and 1 second for waypoint 3.

To randomize these values, we're going to select waypoints 2 and 3 and type '.waypoint mod chance 1-100' on each, with the value between 1 and 100 setting the likelihood of the events of that particular waypoint (in this case, the additional delay) occurring. We want to set these values fairly high so I'll be setting 75 on both.

Using this method, we now have a randomized delay between our character firing. The NPC can either fire in bursts of 3 seconds, 6 seconds, 5 seconds, or 4 seconds. 

 

Waypoint 4 = On this waypoint, we're going to set our character to take aim before firing. To do this, we first want to apply the STATE_HOLD_RIFLE (385) emote using the same method as on waypoint 0. This'll cause the NPC to change their emote to this one once they reach this waypoint. We're also going to want to set another delay as in waypoint 1 after that, so as to give the character time to aim. About 3 seconds should do.

 

Waypoint 5 = On this waypoint, our NPC is going to open fire. To do this, I'll be using spell ID 65977, which plays the animation and also provides the sound effect. To do this, we select the third waypoint and type '.waypoint mod cast 65977'.

 

Now that we're done editing these waypoints, we're going to consolidate them to ensure our NPC plays this sequence of events whilst remaining rooted to the spot.

 

To do this, select the actual NPC. Before you do anything else, you're going to want to apply either [Always Unsheathed] or [Always Unsheathed, Just Right Hand] as the hold animations cause your character to sheath their weapon otherwise. To do this, look up the spell using '.lo spell' and a keyphrase, select the NPC you want to apply this effect to, and type '.npc mod aura' followed by either by the entry ID of the spell, or simply by shift-clicking it to link it in the command.

Now that the aura is applied, type '.npc go' to transport to the exact location of the NPC. Next, select each of your five waypoints and type '.waypoint mod pos'. This'll move the waypoint from it's original location to your current location which, thanks to .npc go, is the exact location of the NPC.

 

Once you've done this, type '.waypoint show' again to hide the waypoints and then type '.waypoint start' to begin the sequence.

 

And you're good to go.

 

DON'T YOU SHOOT, SHOOT, SHOOT THAT THING AT ME!

 

 

Share this post


Link to post
Share on other sites

Hey! I've tried it and it works, but i would like to know if its there a way to create a "battle" between 2 npcs where one casts lightning bolts (or throws arrows) to other.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×