Skip to content

Hammer Bug: Default directory generated for VScripts in the Entity Scripts keyvalue is overly verbose #1797

@310paradox

Description

@310paradox

Describe the bug

When adding a VScript file to an entity that has the 'Entity Scripts' keyvalue via the 'Manage' option, the directory that's generated starts all the way up to the first portal2 folder. This causes the VScript file to not load properly in-game.

To Reproduce

  1. Open the Properties menu of an Enity and go to the 'Entity Scripts' keyvalue, should it have one.
  2. Press 'Manage' and then the add ('+') button.
  3. In the file explorer, go to portal2/portal2/scripts/vscripts to add a VScript file (for example, a script named vscript_file.nut).
  4. The Manage list window will now read "portal2/portal2/scripts/vscripts/vscript_file.nut"
  5. Save the file directory on the entity, and then compile and load into the map.
  6. Open console. You will find an error message that reads:
    "[server_p2] Script not found (scripts/vscripts/portal2/portal2/scripts/vscripts/vscript_file.nut)"

Issue Map

N/A.

Expected Behavior

When adding a file to an entity's Entity Scripts keyvalue via the Manage option, the directory generated should only read up to just below the vscript folder; so that "portal2/portal2/scripts/vscripts/vscript_file.nut" becomes simply "vscript_file.nut"

Operating System

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugThis is a problem with something that should be working one way, but isn't.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions