Carrion crows

Carrion crows

Re: Carrion crows Posted by pWEN on Mon Nov 5th 2007 at 12:34am
pWEN
6 posts
Posted 2007-11-05 12:34am
pWEN
member
6 posts 1 snarkmarks Registered: Jul 1st 2007 Occupation: Nerd Location: USA
Hello! I'm having trouble with crows. I checked the forums here and elsewhere, researching how the birds work in the source engine. But I still need some help in getting them to do what I want.

I have an npc_metropolice in my map, and an npc_crow up on a ledge. When the map starts, the crow takes off and flies in a circle overhead, thanks to path_corners. What I want is for the crow to fly down to the metrocop's body after I sneak up and kill him, to give the impression of it feasting on a dead body.
I'd also like to set it up, if possible, so that the crow doesn't actually take off toward the path_corners until it hears/sees combat, to make it seem like the crow's anticipating a meal after the fighting stops.

The metrocop could die anywhere in the area, so it's been frustrating trying to figure out how to get the crow to break its path sequence and land where the body is.

Any help on this is greatly appreciated!!
Re: Carrion crows Posted by MacD on Mon Nov 5th 2007 at 8:26pm
MacD
8 posts
Posted 2007-11-05 8:26pm
MacD
member
8 posts 1 snarkmarks Registered: Sep 7th 2007
I have absolutely no experience with birds in hl2. But im an ok mapper so im going to take a guess.

I reckon in order to achieve this you need to have an alternative flight path (whatever theyre called) parented to the npc.

Add a trigger to activate when the npc dies that simply makes the bird fly to the alternative path.

Im almost certain there is a way to do this, but like i say i havnt even tried making bird paths.

Let me know if i was along the right tracks tho :smile:
Re: Carrion crows Posted by pWEN on Mon Nov 5th 2007 at 9:22pm
pWEN
6 posts
Posted 2007-11-05 9:22pm
pWEN
member
6 posts 1 snarkmarks Registered: Jul 1st 2007 Occupation: Nerd Location: USA
<span style="color: darkgreen;"></span><span style="color: limegreen;">Thanks for the suggestion MacD. :smile: Unfortunately, I don't think that will work (don't worry, I'll still try it!). path_corners are a bit restrictive in that they're meant for the NPC to follow set paths. info_nodes are their free-roaming cousins. You can name info_node_hints, and mess with them, but I need to figure out how to get the crow to fly to either the NPC directly or the nearest info_node, that the NPC would have to trigger somehow with its death.</span>
Re: Carrion crows Posted by MacD on Tue Nov 6th 2007 at 11:48am
MacD
8 posts
Posted 2007-11-06 11:48am
MacD
member
8 posts 1 snarkmarks Registered: Sep 7th 2007
Just some more suggestions,

Ive found path_tracks have a parent option (whether you can make birds fly to them ive no idea) so this can be parneted to the npc (im assuiming things can be parented to npcs aswell).

Alternatively, info_target can also be parented to things, and im positive youll be able to make the bird fly to an info_target in some way or another.

Do NPC's have outputs, im assuming they must do, and they must have an ondeath trigger (or similar) associated with them, i cant imagine that valve would even consider making a game where NPC activity cant trigger things to happen.

Anyway im quite interested in this myself so post back and let me know if you get it working :smile:
Re: Carrion crows Posted by pWEN on Sat Nov 10th 2007 at 6:35am
pWEN
6 posts
Posted 2007-11-10 6:35am
pWEN
member
6 posts 1 snarkmarks Registered: Jul 1st 2007 Occupation: Nerd Location: USA
Okay, well I've tried a couple of different things now.<br style="color: limegreen;"><br style="color: limegreen;">1.
Parented a path_track to the metrocop, and set the crow to FlyAway with
the path_track as its destination with the cop's OnDeath. Nothing.<br style="color: limegreen;"><br style="color: limegreen;">2.
Added a path_corner with next target set to the path_track, and changed
the FlyAway destination to the path_corner. The crow seemed to fly to
the path_corner when the cop died, but refused to go further.<br style="color: limegreen;"><br style="color: limegreen;">3.
Removed the path_corner and path_track and set up an info_target that
was parented to the metrocop, with his OnDeath output set to make the
crow FlyAway to the info_target. Nothing.

4. This seems to bear the most promise. I set an ai_goal_follow with Actors to Affect: crow (name of the npc_crow), Target Entity cop (name of the npc_metropolice), Start Active 'yes', Maximum State 'combat', and Formation 'sidekick'. When the map starts, and whenever the cop moves around, the crow frantically walks in place trying to keep up. I've got path_nodes everywhere and even tried putting some path_node_airs near it to try and get the bird to move, but no success. Still, I feel closer with this option. The crow stops running when the cop dies, and tries to run away if I shoot near it.<br style="color: limegreen;"><br style="color: limegreen;">Part
of the problem is that I can't tell if the path_track and/or
info_target are actually following the metrocop around. I'm going to
assume they're not. Actually, in my experiences in dealing with
info_targets, I've found that NPCs ultimately ignore them. Maybe I
don't understand their proper usage, so if anyone can explain them in
better detail it'd really make my day.<br style="color: limegreen;"><br style="color: limegreen;">Is it even possible for anything to follow an NPC in such a way?