Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: While we're playing with the prop spawn, help with npc_enemyfinder?  (Read 2476 times)

0 Members and 1 Guest are viewing this topic.

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
I can't seem to get npc_enemyfinder to notify a squad of combine spawned out of sight that I'm standing around the corner. (Working with SMOD: Tactical 5.56 using dm_3houses as a test map)

I've read through the valve wiki and read literally every post turned up by google search, and nobody else seems to have a problem with it.

Code: [Select]
"npc_enemyfinder" {
"origin" "-522 -674 40"
"keyvalues" {
"squadname" "squad1"
"targetname" "findme"
"sleepstate" "0"
"fieldofview" "-1"
// "maxsearchdist" "999999"
"starton" "1"
}
}

Then there's three combine_s spawned around the corner of a building:

Code: [Select]
"npc_combine_s" {
"origin" "94 -2185 49"
"keyvalues" {
"squadname" "squad1"
"targetname" "comb1"
}
}
"npc_combine_s" {
"origin" "145 -2253 45"
"keyvalues" {
"squadname" "squad1"
"targetname" "comb1"
}
}
"npc_combine_s" {
"origin" "242 -2265 29"
"keyvalues" {
"squadname" "squad1"
"targetname" "comb1"
}
}


I've read various theories that you have to "turn on" the npc_enemyfinder, set the relation to gh1, create an enemyfilter targeting !player, but none of them seem to work.

I'm sure there must be something I'm doing wrong.

I appreciate any help!

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #1 on: September 05, 2013, 02:45:57 PM »
I'm using several with no problems...although only for extra insurance.

I like scripted schedules better for getting NPCs spawned out of the players view to the player.


Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #2 on: September 05, 2013, 03:00:06 PM »
remove the // in front of "maxsearchdist"

Offline Rook

  • *
  • +2% chance to make useful post
  • Rook has no influence.
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #3 on: September 05, 2013, 07:34:27 PM »
You might have to change the spawnflags. I used to play with the Combine mortar a bunch and had that squadded up with a finder with flags set to 589824. That ticks the "Do not cheat by looking through walls, floors, etc." flag and the "Can be enemy" flag. I added a few soldiers to the squad and the finder/mortar targeted the player because of the soldiers' relationship with the player. As soon as you killed the soldiers, the finder would ignore you. Fun!  :D

You can always just use a schedule like Mr. BIZ said though. Just pair an instant_trig or something else to that and you should be set!
Code: [Select]
"instant_trig" {
"origin" "-522 -674 40"
"keyvalues" {
"OnHitTrigger" "findme_orders,StartSchedule,,0,1"
"touchname" "!player"
"radius" "768"
}
}
"aiscripted_schedule" {
"keyvalues" {
"targetname" "findme_orders"
"graball" "1" // Apply the schedule to all the soldiers
"m_iszEntity" "comb1"
"schedule" "6" // goalent is an enemy!
"goalent" "!player"
}
}
« Last Edit: September 05, 2013, 07:42:29 PM by Rook »

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #4 on: September 05, 2013, 07:39:40 PM »
remove the // in front of "maxsearchdist"

That's how I had it before, but it still wasn't working, so I thought the variable may have been spelled incorrectly, and to test it I had it pointed right at the player spawn from about 30 units away.


Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #5 on: September 05, 2013, 10:46:56 PM »
You might have to change the spawnflags. I used to play with the Combine mortar a bunch and had that squadded up with a finder with flags set to 589824. That ticks the "Do not cheat by looking through walls, floors, etc." flag and the "Can be enemy" flag. I added a few soldiers to the squad and the finder/mortar targeted the player because of the soldiers' relationship with the player. As soon as you killed the soldiers, the finder would ignore you. Fun!  :D

You can always just use a schedule like Mr. BIZ said though. Just pair an instant_trig or something else to that and you should be set!
Code: [Select]
"instant_trig" {
"origin" "-522 -674 40"
"keyvalues" {
"OnHitTrigger" "findme_orders,StartSchedule,,0,1"
"touchname" "!player"
"radius" "768"
}
}
"aiscripted_schedule" {
"keyvalues" {
"targetname" "findme_orders"
"graball" "1" // Apply the schedule to all the soldiers
"m_iszEntity" "comb1"
"schedule" "6" // goalent is an enemy!
"goalent" "!player"
}
}

That would certainly seem easier.

However, according to the valve developer wiki, that won't work. I'm not saying it won't work, I haven't tested it yet, but does this mean that the valve wiki is not always correct? In which case, that may be why other stuff doesn't work?

Then again, I only recently figured out to turn on developer 2 and manually send inputs to entities to see what happens so I can put the correct stuff into the mapadd...


Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #6 on: September 05, 2013, 10:52:37 PM »
ai schedule def works...I can confirm. Although I have yet to try setting it to !player. I usually make a info_target to point at so they move to the general area where the action is...combine that with a well placed npc_enemyfinder (or several) and there is no way the AI will miss you.

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #7 on: September 06, 2013, 01:15:28 AM »
ai schedule def works...I can confirm. Although I have yet to try setting it to !player. I usually make a info_target to point at so they move to the general area where the action is...combine that with a well placed npc_enemyfinder (or several) and there is no way the AI will miss you.

I don't know if I can trust you. You're also saying that npc_enemyfinder works...

I'm off to try the aiscripted_schedule, thanks. I'll probably also mess around with the spawnflags for npc_enemyfinder.

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #8 on: September 06, 2013, 01:29:52 AM »
I can definitely confirm that if you forget to node the test map you're using, the assault command with assault_rallypoint and assault_assaultpoint will only work if the points are very close together.

LeDerp.

I've got to do more tests to see if other stuff works now, which I had discarded for lack of combine movement.



aiscripted_schedule works.
npc_enemyfinder does not (for me, and I can't find a list of spawnflags specific to it, only a default list).
assault works.
« Last Edit: September 06, 2013, 01:46:19 AM by Zadaki_L »

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #9 on: September 06, 2013, 03:54:58 AM »

I don't know if I can trust you. You're also saying that npc_enemyfinder works...

lol you are doing it wrong :P


http://youtu.be/IU1nBDlvyeM


Code: [Select]
"npc_enemyfinder" {
"origin" "407.3 -7221.4 1088.0"  "angle" "0 145 0"
"keyvalues" {
"targetname" "a_b3_iii_com-houseparty-squad-spotter"
"squadname" "a_b3_iii_com-houseparty"
"FieldOfView" "-1.0"
"MinSearchDist" "0"
"MaxSearchDist" "2048"
"ignoreunseenenemies" "0"
"StartOn" "1"
}
}

EDIT - Actually to be more helpful your node issue is probably causing the NPC's not to move. Use the convar npc_squads to determine if the npc_enemyfinder and his squadmates are actually acquiring enemies and just not moving to them.
« Last Edit: September 06, 2013, 05:44:33 AM by BIZ »

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: While we're playing with the prop spawn, help with npc_enemyfinder?
« Reply #10 on: September 06, 2013, 12:06:42 PM »

I don't know if I can trust you. You're also saying that npc_enemyfinder works...

lol you are doing it wrong :P


http://youtu.be/IU1nBDlvyeM


Code: [Select]
"npc_enemyfinder" {
"origin" "407.3 -7221.4 1088.0"  "angle" "0 145 0"
"keyvalues" {
"targetname" "a_b3_iii_com-houseparty-squad-spotter"
"squadname" "a_b3_iii_com-houseparty"
"FieldOfView" "-1.0"
"MinSearchDist" "0"
"MaxSearchDist" "2048"
"ignoreunseenenemies" "0"
"StartOn" "1"
}
}

EDIT - Actually to be more helpful your node issue is probably causing the NPC's not to move. Use the convar npc_squads to determine if the npc_enemyfinder and his squadmates are actually acquiring enemies and just not moving to them.

Yeah, I went back and added nodes. Everything else seems to be working except enemyfinder. Without nodes, the assault input would only send the combine to an assault_rallypoint or assaultpoint if it was VERY close. Now, it works regardless of distance, and normal navigation works too.

Still can't figure it out.