Half-Life: Alyx

Half-Life: Alyx

Expand the world of Half-Life: Alyx
Browse the Half-Life: Alyx Workshop to find the best new addons created by the community, or install the free tools yourself and start making your own Half-Life: Alyx content.
Learn More
JediPunk 3 16 Jul, 2023 @ 9:40am
how can i force a "npc_combine_s" (grunt) shoot a "prop_phys - explosivebarrel ?
hello,

i want a npc_combine_s (grunt) force to shoot a "explosive barrel" on trigger. can you please help me?

scenario idea:

1. i created a prop_phys (explosive barrel)
2. i surounded the barrel with a trigger_multiple (disabled)
3. when a zombie enter the trigger i want the combine to switch the target to the barrel and shoot it until the barrel explode.

i just want the npc_combine_s to acitave traps by shooting them.

thx in advance
< >
Showing 1-3 of 3 comments
Schranzi 17 Jul, 2023 @ 8:24am 
I would try to solve the whole thing with an AI_Relationship, but I don't know if you can use an AI_Relationship to tell an NPC to see a barrel as an enemy.

Here I once explained to someone how to make it so that NPc`s do not attack you
https://steamhost.cn/steamcommunity_com/workshop/discussions/18446744073709551615/3714937078840054420/?appid=546560

Normally it should be possible to assign an AI_Relationship to the barrel and as soon as a zombie runs into a trigger (trap) or however it triggers this relationship ob the combine (where you can set if hate, neutral, like etc . The Target for sure the barrel then).

But never tried, just an Idea. I haven't tried anything with the Hammer Editor for a very long time.
Last edited by Schranzi; 17 Jul, 2023 @ 8:27am
JediPunk 3 17 Jul, 2023 @ 7:02pm 
Originally posted by Schranzi:
I would try to solve the whole thing with an AI_Relationship, but I don't know if you can use an AI_Relationship to tell an NPC to see a barrel as an enemy.

Here I once explained to someone how to make it so that NPc`s do not attack you
https://steamhost.cn/steamcommunity_com/workshop/discussions/18446744073709551615/3714937078840054420/?appid=546560

Normally it should be possible to assign an AI_Relationship to the barrel and as soon as a zombie runs into a trigger (trap) or however it triggers this relationship ob the combine (where you can set if hate, neutral, like etc . The Target for sure the barrel then).

But never tried, just an Idea. I haven't tried anything with the Hammer Editor for a very long time.

Hello Schranzi, i thank you for taking your time. i was not able to use the ai_relationship to make the grunt hostile toward the barrel. but your sugestion inspired me to think a bit outside the box.

here is my protype solution if your interested. i dont know if its pratical in a actual game situation. ( why is it so hard to do this? i can force the grund to throw a grenade or launch a manhack. but simply target and shoot a designated area is impossible. in hl2 ther was a sniper_target for the npc_sniper (or something like that). but in alyx its different. anyway.)

the goal: force the combine to shoot the barrel to create the impression he uses the enviroment to fight the enemy.
the solution: i spawn a invisbile npc_headcrab inside the barrel. combine automatically fight headcrabs.

possible implementation: i imagine a set of traps like the explosive barrels, the npc_combine_s can activate against other npc_enemy. by shooting or using abutton.
for emample:
-electrical devices that creates sparks.
-gas, water, steam leaks that create a damageeffect
-droping physical objects taht hang around.
-releasing objects that roll down a slope. (logs, a truck, rocks)
-breaking and destroying specific objects likes crates, bottles and windows
-and so on


https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3006073386

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3006081044
Last edited by JediPunk; 17 Jul, 2023 @ 7:26pm
Schranzi 18 Jul, 2023 @ 7:36am 
good Solution ... nice. If i have more time i will test something
< >
Showing 1-3 of 3 comments
Per page: 1530 50