NPC only button? And "unkillable" NPCs? Created 5 years ago2018-07-27 14:00:12 UTC by torekk torekk

Created 5 years ago2018-07-27 14:00:12 UTC by torekk torekk

Posted 5 years ago2018-07-27 14:00:12 UTC Post #340283
Well apparently even after giving a func_rot_button a name(or does it need to be a global name?), setting a master(which is an existing multisource that gets triggered via an path_track's fire on pass) I still can't get it to be NPC only.

So my entity setup is like:

path_track -> multisource -> * func_rot_button

* actually there's a scripted_sequence which then triggers the func_rot_button, but that shouldn't matter?

Edit: Fixed the button, it was just a targeting mistake. I had the path_track trigger the multisource, which triggered the scripted_sequence, changed that so the scripted_sequence triggers the multisource and now it works as expected, the player can't turn the func_rot_button.

What if the player kills the NPC that activates the button, I read there's the "no interruptions" flag for that in scripted_sequences, which doesn't seem to work though.

Or I guess I could use environmental stuff, like putting the NPC in a room with windows and such so the player is less likely to kill him, but still could see he performs an action that's required for the player to pass on the level? Like opening a door as an example. However from a design perspective I dislike the idea of having a room that you can look inside, but not enter.

Edit: Well seems the no interruptions flag works for the time the sequence plays, however if I setup an idle animation and then have the NPC "teleport" to the button it'd be weird and I guess in the time he's walking there, the player could kill him. Just wanting to make sure I'm not introducing any game breaking bugs by relying on certain NPCs, guess I could just also warn people before playing.
torekk torekkProcrastinator of the Year
Posted 5 years ago2018-07-27 14:36:20 UTC Post #340284
You could've just used func_door_rotating for the button if it's not supposed to be pressed by the player. Unless I misunderstood something, as always.

You could make the game load the latest autosave if the NPC is killed, there's a separate entity for that. Also you can use aiscripted_sequence which will prevent the monster from dying until it completes the current sequence. It will also prevent the sequence from being interrupted by anything else.
You must be logged in to post a response.