Jump to content

Need a Starfield replacement for "DisablePlayerFiring()" used in Skyrim and Fallout 4


Recommended Posts

     Hi, I need to set a trigger box where the Player cannot fire his weapon. Can this be done? It's an area where I need to prevent the player from firing, until he leaves the trigger box. I need the player to maintain their weapon, just not be able to fire it in that area. I cannot find a sustitute for DisablePlayerFiring() that Skyrim and Fallout 4 has, I need something like this, but for Starfield. This is a script for Skyrim or Fallout 4, but Starfield does not compile it, due to "DisablePlayerFiring()" not existing in this game.
 

Event OnTriggerEnter(ObjectReference akActionRef)
    if akActionRef == Game.GetPlayer()
        DisablePlayerFiring()
    endif
EndEvent

Event OnTriggerLeave(ObjectReference akActionRef)
    if akActionRef == Game.GetPlayer()
        EnablePlayerFiring()
    endif
EndEvent

 

     Thank you very much for all your help!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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