Jump to content

Perk Entry Point (Activate) - Variable For Activated Target?


FiftyTifty

Recommended Posts

Hullo lads, got a wee question.

 

I've added a perk to New Vegas, that uses the Activate entry point. When the player activates a dead robot, it will prompt the player with the option "Repair Robot". When the player selects the option, it will run a script that does something like this psuedo-code mish-mash:

string_var strRobotName

strRobotName := GetName(activated target)

if strRobotName = Protectrion then

    Spawn a custom protectron
    Disable(activated target)
    MarkForDelete(activated target)
    
endif

if strRobotName = Mr. Gutsy then

    Spawn a custom Mr. Gutsy
    Disable(activated target)
    MarkForDelete(activated target)
    
endif

Trouble is, I need to get the dead robot that the player activated. What's the built-in variable to the perk entry point, that returns the activated thingymajigger? Y'know, like Skyrim's akAggressor (for OnAttack events) and akSpeaker (for dialogue scripts).

Link to comment
Share on other sites

Activation perk entry scripts runs directly on the reference that you activated, so you can call any reference functions using implicit reference syntax.

 

If you want to retrieve the reference and put it into a variable you can use GetSelf.

 

Oh! Sweet, so you just have to call the function. I was thinking I would have had to call GetCrosshairRef, but nay!

 

Thanks matey.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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