FreeSlave / halflife-featureful

Half-Life SDK for making mods upon it
https://discord.gg/A7ZErQAjfa
Other
25 stars 5 forks source link

Unexpected brush trigger behaviours #5

Open mfaizsyahmi opened 9 months ago

mfaizsyahmi commented 9 months ago

I'm trying to use trigger_multiples to detect when a point entity named in the netname ("Triggered only by entity") field moves into its bounding box, but it never gets triggered. First with an info_ entity, then with env_spritetrain, both fail to set off the triggers.

Also, netname-targeted monsters only set off the trigger when they move, and not when they stand still inside the trigger.

Not sure if this is intended to emulate old sohl behaviour, but I consider them as bugs.

FreeSlave commented 9 months ago

Hi. info_ and env_spritetrain entities are not solid, so they never touch the trigger. I probably should design some alternative solution that could check for non-solid entities. Or add a property for env_spritetrain that would set its physics so it could touch the trigger. As for monsters - yep, that's how it works in HL. Touch is always registered only for players, other entities should move in order to register the touch. I could implement a hack similar to the trigger_hurt's Affect non-moving NPC's spawnflag (trigger_hurt has the similar issue with no dealing damage to monsters who stand still, again, due to how touch registering works in HL). All of this is not SoHL specific behavior, it's HL behavior.

I'll probably start with looking at implementing a new parameter for env_spritetrain. I'll tell you when when I push new changes.