Tutorial collection, comprehensive listings on main site.


Postby Tutorial on Mon Mar 07, 2005 10:33 pm

General Half-Life 2/Scripting

The almighty strider explained.

strider, striders, npc, npc_strider.

Striders are, in terms of HL2 enemies, stupid. Incredibly stupid, in fact. They have no random path-finding AI to speak of. If you create one on its own, it'll just stand there. Even if you give it targets to shoot, it'll shoot at them, whilst standing perfectly still. The only thing it can actually do is crouch, or stamp, if a target happens to be close enough or out of its line of sight.

Things to bear in mind: Striders hunt. They don't walk around randomly, they actively hunt things they've seen. They don't do much when there aren't any targets for them to attack. In fact, they tend to stand still, that I've noticed. Therefore, if you want a Strider running around your level, give it things to attack. The player is acceptable.

This is how to make a moving Strider in your map.

Step 1; Create a map. Preferably, make one taller than your Strider, or at least as tall. Otherwise, the poor bugger won't fit.

Step 2; As already mentioned, your Strider will perform best with a lot of things to shoot at around it. Make sure there are lots of things you want your Strider to shoot. If the Strider is only hunting the player, you may want to make the level either fairly linear, or centered around one point. A building works well.

Step 3; Make a path_corner for your Strider to walk to. Place it in the thick of where the action will be. A working Strider needs only one path_corner to walk to; you can add a huge path if you want, but remember that your Strider won't deviate from it until the end.

To make your Strider walk to the path_corner, select it, and hit alt-enter. Set the 'Target Path Corner' property to whatever your path_corner is called.

If you were to run the map now, the Strider would do absolutely nothing. They're useful, like that. This is because Striders need nodes to move around; without nodes, they're blind.

Step 4; Add nodes for your Strider. Now; normal ground troops use an info_node. Flying npc's, like scanners, use info_node_air. What do you think a Strider uses?

...info_node_air_hint. There's a good reason for this. Mainly, it's because Striders are so damn tall.

Why the _hint type node, and not normal? You can't set the type of a normal node, is why. Striders need specialised Strider nodes; and you can only set specialised nodes with _hint nodes.

Your Strider, therefore, needs info_node_air_hint nodes with their Hint property set to Strider Node. Place these at around the Strider's 'head' height; use the editor to check this. It doesn't matter a huge amount exactly how high the nodes are, as long as the Strider can reach them. 'Head' height just keeps them out of the way of ground nodes, and makes it easier to tell where your Strider's going to end up.

You'll want a few of these info_node_air_hint. In fact, you'll want one everywhere you want your Strider to be able to walk to. As I said, they don't find places to stand on their own; they walk from node to node, and sod all else. Generally, if you're creating a combat situation in a wide open space, you'd make the path_corner for the Strider either smack in the middle of all these nodes, or in a corner. That way, the Strider has plenty of choices of where to head once it's free of the path.

Step 5; Play with your Strider. Give it a few resistance member npc_citizens to kill. In fact, give it an infinite number. As long as they're not spawning with rocket launchers, your Strider's fine. It'll walk to its path_corner, then wander happily around the nodes you've set killing people at will. There's your Strider.

Now; I guess you're next going to want to know how to fire the Strider cannon, aren't you? That goes more into entity I/O than anything else, and isn't really in the scope of this tutorial type thing.

However, I'm drunk. So I'll tell you. You'll need to set up any sort of entity that can send off inputs to another entity. Triggers, for example, can do this. You'll want your Trigger to tell your Strider to execute the input 'SetCannonTarget target', where target is the name of the entity you want it to shoot. This can be any entity at all that's currently in the map; If you want to target the Player, use !player.

It stings a little.

Some other useful commands for your Striders are:

- Don't send PM's to this user -
Not A Real User
Joined: Sun Mar 06, 2005 11:00 pm

Postby Sauce on Mon Nov 28, 2005 4:15 am

:shock: WOW... Striders are stupider than I thought! Another thing to mention, don't give your resistance members any super grav guns either if there's a source of those combine energy balls around somewhere, 'coz they'll kill it too! ...unless you WANT to kill it of course :wink:
Blink wrote:Do you watch porn and decide you don't need to have sex because you've seen the ending? :-D

zombie@computer wrote:what retarded countries measure in stones anyway?
or feet? or inches? Your dick is a lot longer in cms
User avatar
Senior Member
Senior Member
Joined: Sat Nov 26, 2005 4:36 am
Location: Australia

Postby Hyp-R on Mon Nov 28, 2005 6:02 am

IHaveTheLongestNameInTheWorldSoImTheBestAndAlsoBumpTopicsFromMarchSoGiveMeAHug Says:

Yeah striders are stupid, but who's the dumbest?


Guy who replies to a topic this old.

Haha just having fun,
May Contain Skills
May Contain Skills
Joined: Thu Jun 16, 2005 11:00 pm

Postby Blink on Mon Nov 28, 2005 8:12 am

Actually, if you'd check then the tutorial threads cannot be bumped. The reason is they are linked from the main site and are purely for comments and not really discussion. Hence someone can read a tutorial posted in Jan and still comment on it freely.

So try not to pick useless fights eh?
User avatar
Cool 'n that
Cool 'n that
Joined: Fri Oct 08, 2004 4:16 pm
Location: UK

Postby SlappyBag on Wed Dec 06, 2006 4:33 pm

Love the fact that your current avatar is looking up at his post with a 'Wtf yo be on about' attitude. ^_^

Nice tutorial as well. :wink:
User avatar
Joined: Sun Jun 26, 2005 9:16 am
Location: Brighton, UK

Postby Stino on Fri Jan 05, 2007 10:46 am

striders do not walk randomly around?

they do, i just got a strider walking around from node to node without any targets to shoot at
Joined: Wed May 31, 2006 8:50 am

Postby shiftybill on Thu Jan 18, 2007 1:56 pm

no matter what i do my strider will just stand there, ignoring the path_corners

i have followed everything except im spawning templates from a template maker

i got it to work after using a aiscripted schedule
Drinking your own blood is the paradigm of recycling

- Gary Busey
Joined: Sun Dec 24, 2006 1:05 am
Location: Brisbane, Australia

Postby CabooseJr on Sat May 05, 2007 10:53 pm

I know, I'm new, but i cannot get my strider to shoot its cannon at the building i want it to. could anybody post a prefab or something?
Joined: Sat May 05, 2007 8:43 pm

Postby jmplayer on Mon Jun 04, 2007 12:36 am

It is possible to make a Strider move by only info_node_air_hints.

In the key value with the 1st INAH(info_node_air_hint) you want the Strider to go to, set the target node of the first one to the Node ID of the second. Make sure you've named that first INAH! Then make an output to make that strider go to the first node. Much easier and less repetitive than the above tut.

To above poster: this should help you:
[url='']Working Title Orange Box Map Images[/url]

Dread Alert map [WIP] First map beta.
Been Here A While
Been Here A While
Joined: Fri Jan 19, 2007 2:34 am
Location: Kirkland, WA (next to Valve's home city)

Postby Kodox on Mon Jun 04, 2007 1:26 pm

Can Striders use scripted sequences?
User avatar
May Contain Skills
May Contain Skills
Joined: Fri Jul 21, 2006 7:54 pm
Location: Ohio

Re: Striders

Postby Stino on Sun Feb 17, 2008 7:53 am

i suggest you try, they are npc's so they should be able
Joined: Wed May 31, 2006 8:50 am


Postby Mark Richard on Sat Jun 07, 2008 11:27 am

CabooseJr wrote:I know, I'm new, but i cannot get my strider to shoot its cannon at the building i want it to. could anybody post a prefab or something?

I know the user asked about this a year ago. But I thought I should mention a solution for future Hammer-users.
I've had this Strider-problem too, and to solve it. Simply just add a ai_relationship entity. Set it up so it starts inactive.
Make all the inputs and outputs so the Strider will shoot at an npc_bullseye. At the same time when the Strider is supposed to fire its cannon, activate the ai_relationship.
User avatar
Mark Richard
Joined: Sat Apr 29, 2006 8:46 pm
Location: The Kingdom of Sweden

Re: Striders

Postby Josh on Thu Oct 02, 2008 11:16 am

very nice tutorial thanks.
User avatar
Joined: Wed Oct 01, 2008 6:08 pm

Re: Striders

Postby srredfire on Wed Jun 15, 2011 3:36 pm

Amazing bump.
Joined: Sat Jul 22, 2006 10:44 pm

Re: Striders

Postby Dr. Delta on Thu Jun 16, 2011 2:16 am

srredfire wrote:Amazing bump.



Blink wrote:Actually, if you'd check then the tutorial threads cannot be bumped. The reason is they are linked from the main site and are purely for comments and not really discussion. Hence someone can read a tutorial posted in Jan and still comment on it freely.

So try not to pick useless fights eh?
User avatar
Dr. Delta
Joined: Thu Dec 27, 2007 1:18 pm
Location: People's Republic of Porygon

Return to Tutorials

Who is online

Users browsing this forum: No registered users