Jump to content

Recommended Posts

Trap Trigger

View File

Traps trigger 1.0.0
 

This mod follow semantic versioning.
A modder resource to build a mod that hooks to various actions of the player.

 

Features
 

Hook when collecting a plant (`trap_events_trigger_plants_start`, `trap_events_trigger_plants_end`)
Hook when opening a door (`trap_events_trigger_door_start`, `trap_events_trigger_door_end`)
Hook when opening a container (`trap_events_trigger_container_start`, `trap_events_trigger_container_end`)
Hook when opening a corpse (`trap_events_trigger_corpse_start`, `trap_events_trigger_corpse_end`)
Hook when player looks in a container/corpse (`trap_events_trigger_in_container`)
Hook when player take an ground object or activate a lever (or a kind of) (`trap_events_trigger_trap_start`, `trap_events_trigger_trap_end`)

 

Getting Started
 

Requirements

  • SKSE SE

 

Papyrus setup
 

  • Import Trap trigger in your script as a property, the script name is `trap_main` (ex: `trap_main Property trapMain Auto`)
    • Register a hook with `RegisterForModEvent`, for example with container_start event

 

RegisterForModEvent(trapMain.trap_events_trigger_container_start, "OnContainerTrap")

 

  • Create the event

  

Event OnContainerTrap(Form akActor, Int source, Form object)
EndEvent

 

  • Then, everytime the player opens a container, this event will trigger.
     

Known issues
 

None
 

Used by
 

Devious Traps


  • Submitter
  • Submitted
    08/16/2021
  • Category
  • Requires
    SKSE SE
  • Regular Edition Compatible
    No

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use