Jump to content

Can you script an NPC to attack funcbreakables?


OCD2

Recommended Posts

Posted

Hello,

Was wondering if you can can you script an NPC to target and attack funcbreakables when the NPC comes in proximity to the funcbreakable in a map?

Or would that be a coding mod?

Droidy365 likes this
Posted

It might be possible to have an invisible and invincible NPC that your NPC wants to attack, with the func_breakable being "collateral damage."

Other than that, I think it might be possible with scripting? I'm not all that experienced with that sort of thing, so I don't know for sure.

Posted
1 hour ago, Droidy365 said:

It might be possible to have an invisible and invincible NPC that your NPC wants to attack, with the func_breakable being "collateral damage."

Other than that, I think it might be possible with scripting? I'm not all that experienced with that sort of thing, so I don't know for sure.

Ah, I see your line of thinking.   That seems like it could produce the effect im trying to achieve.

Could the invisible invincible NPC then be connected to the funcbreakable somehow, so that when the funcbreakable is destroyed, the invisible invincible NPC "disappears"/dies? 

Droidy365 likes this
Posted
9 hours ago, Ramikad said:

I think (but I'm not 100% sure) that you can set a deathscript to the func_breakable to remove (through script) the NPC:


//(BHVD)
remove ( "NPC targetname" );

 

I'll have to give that a try, thank you.

Droidy365 likes this

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...