Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • openmw openmw
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 754
    • Issues 754
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 38
    • Merge requests 38
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenMWOpenMW
  • openmwopenmw
  • Issues
  • #5991
Closed
Open
Created Apr 28, 2021 by Dev Shah@4185.stkabirdin

Activate should always be allowed for inventory items

Script which works on vanilla doesn't work properly on OpenMW. Attached script does not open the book while equipping it from the menu. (The script itself works)

begin your_script_name

short OnPCEquip
short PCSkipEquip

set PCSkipEquip to 0
; any actions that might end the script must be placed lower than this line

; Activating from the inventory
if ( MenuMode )
    set PCSkipEquip to 1

    if ( OnPCEquip )

        ; place actions for when the player opened the book from the inventory here
messagebox "opened in inventory"
        set OnPCEquip to 0
        set PCSkipEquip to 0
        Activate
    endif

    return
endif

; Activating in the world
if ( OnActivate )

    ; place actions for when the player opened the book from the world here
messagebox "opened in world"
    Activate
endif

end
Edited Apr 28, 2021 by Evil Eye
Assignee
Assign to
Time tracking