Jump to content

[LE] Prevent Player Exiting Furniture with Activate


Recommended Posts

Hey folks. The player is able to exit furniture by either moving or pressing the activate key. Is there a way to block the activate from working? In this instance I'm trying on a specific piece of furniture. I've tried calling BlockActivation() inside an OnActivate() event with no success.
Link to comment
Share on other sites

You can use:

SetDestroyed(True)

this way the player still retain all his monvents and he can not activate/exit the furniture, at least until:

SetDestroyed(False)

is call on the furniture.


* Also this way the "E" activate will not show in screen while it's in a "SetDestroyed(True)" state.


EDIT: I forgot to add that the "SetDestroyed()" must be call on the object by the same object / script.

Edited by maxarturo
Link to comment
Share on other sites

  • 8 months later...

Whew, finally coming back to this. I have some findings to share regarding SetDestroyed().

 

  • Disables player movement exiting furniture, as well as activation to exit furniture.
  • Can be called from another script, it does not have to be a script attached to the object ref.
  • Although furniture object in use does not receive activation events when destroyed, activation events caught by Perk Entry Points still fire.
  • The player is still able to activate other objects while still on the furniture (like triggers)

The fact that Perk Entry activation still works means you could script the ability to exit the furniture with a message box prompt.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...