Behavior Created 17 years ago2007-01-08 08:02:07 UTC by bal bal

Created 17 years ago2007-01-08 08:02:07 UTC by bal bal

Posted 17 years ago2007-01-08 08:02:07 UTC Post #208983
Hi folks! Can i script a monster to change it's feelings towards the player in spirit of half life? I want soldiers to become hostile if you enter a certain area
Posted 17 years ago2007-01-08 10:41:01 UTC Post #208993
Posted 17 years ago2007-01-08 12:34:57 UTC Post #209002
You can use env_customize to do it. Here is an example script.

-

trigger_auto

target: customize_01

-

monster_human_grunt

targetname: soldier_01

-

env_customize (first)

targetname: customize_01

target: soldier_01

mi_iPlayerReact (reaction to player): friendly unless provoked

This is for default behaviour.

-

trigger_once (for the specific zone you want)

target: customize_02

-

env_customize (second)

targetname: customize_02

target: soldier_01

mi_iPlayerReact (reaction to player): enemy

When you get through the trigger_once, soldier_01 (monster_human_grunt) will start attacking you. See SOHL's entity guide (especially trigger conditions for NPCs part) to learn more about variations.
Posted 17 years ago2007-01-08 12:53:01 UTC Post #209003
I dont think thats really necessary since spirit already allows you to customize their behaviours in properties.

But I think you just want them to be hostile when you enter somewhere...

I never tried barneyinblue's way but you can make the soldiers friendly to gordon at first then put a trigger_once (targetting a trigger_relay) in that certain area and set that trigger_relay to kill all the friendly soldiers Also, put monster makers at the locations of those friendly soldiers and set its targetname the same as the trigger_relay. So when its triggered friendly soldiers will vanish and monster_makers will replace them with the hostile soldiers.
Posted 17 years ago2007-01-08 14:06:47 UTC Post #209010
Thanks for pointing that out Sajo! The NPC's behaviour/reaction to player can be changed from propertiers.
You must be logged in to post a response.