Jump to content

Photo

Container perk


  • Please log in to reply
3 replies to this topic

#1
evllprchn

evllprchn

    Stranger

  • Members
  • Pip
  • 8 posts
I'm trying to make a new perk that triggers when the player opens a container. I have successfully added the perk to the player, but I'm having trouble getting the perk's script to trigger without crashing.

Perk entry information:

Level: 0
Num Ranks: 1
Conditions: (blank)

I don't have the Trait, Playable, or Hidden checkboxes checked.

There's a single perk entry, as follows:
Rank: 1
Priority: 0
Entry Point: Activate
Function: Add Activate Choice
Button Label: (blank)
Run Immediately is checked.
Start Script body: ShowMessage TestMessage

Perk entry conditions:
Perk Owner: (none)
Target: S GetIsObjectType Container == 1.00

TestMessage a message that should display "This is a test message." I've tried it with and without MessageBox checked, and I've tried it with and without Auto-display checked.

When I open a container, New Vegas crashes. Can anyone help me with my perk?

#2
Vagrant0

Vagrant0

    Usually Right, Occasionally Left.

  • Staff
  • 9,948 posts

I'm trying to make a new perk that triggers when the player opens a container. I have successfully added the perk to the player, but I'm having trouble getting the perk's script to trigger without crashing.

Perk entry information:

Level: 0
Num Ranks: 1
Conditions: (blank)

I don't have the Trait, Playable, or Hidden checkboxes checked.

There's a single perk entry, as follows:
Rank: 1
Priority: 0
Entry Point: Activate
Function: Add Activate Choice
Button Label: (blank)
Run Immediately is checked.
Start Script body: ShowMessage TestMessage

Perk entry conditions:
Perk Owner: (none)
Target: S GetIsObjectType Container == 1.00

TestMessage a message that should display "This is a test message." I've tried it with and without MessageBox checked, and I've tried it with and without Auto-display checked.

When I open a container, New Vegas crashes. Can anyone help me with my perk?

Are you wanting to prevent use of the container or are you wanting some perk effect to be applied when the player is using a container?

#3
evllprchn

evllprchn

    Stranger

  • Members
  • Pip
  • 8 posts
The end result is to modify the contents of the container. The easiest way to do that seemed to be making a script that triggered when the player activated a container. The easiest way to trigger a script seemed to be a perk. I'm certainly open to any other suggestions!

#4
evllprchn

evllprchn

    Stranger

  • Members
  • Pip
  • 8 posts
So, any ideas as to why the script is crashing?




Page loaded in: 1.071 seconds