Jump to content

IsEquippedWeaponScoped Owner or Weapon condition?


Yamatohime

Recommended Posts

I got confused with this one condition... I want to add that scopped weapons to deal more damage but kind can't understand where should I put this condition (if it is working at all), into weapon conditions or PerkOwner conditions?

 

Or should I use GetWeaponHasScope?

Edited by Yamatohime
Link to comment
Share on other sites

Couple of implied things need clarification.

 

Perks can only apply to the Player (and using the undocumented function "player.addperk XXXXXXXXXXXXX 1", to companions. See 'TIP: Perks for Companions' under the "Custom NPCs" section of the wiki "Getting started creating mods using GECK" article).

 

"GetWeaponHasScope" requires an object reference parameter, so it doesn't know or care if the weapon is equipped or even in the inventory of the Actor in question. Assuming you want the "perk" to only apply when a scoped weapon is actually used, "IsEquippedWeaponScoped" is the better choice to determine that condition is met because you have the "ActorRef" either explicitly defined or (more typically) implied by who invoked/called the Perk (i.e. the "Perk Owner"). You DO need to ensure you have a refvariable containing that "ActorRef" prefixing the function. It's required; not optional.

 

Such a conditional test should be placed within the "Perk Entry" point "Conditions".

 

You ought to add a check ("HasPerk") to see if the perk has already been given to the player. Use "GetPerkRank" if you want it to have multiple "levels".

 

-Dubious-

Link to comment
Share on other sites

Should be. (I'm interpreting the GECKwiki as I haven't actually done this myself.) However, in the wiki "ActorRef" is a generic term. Do not assume it is automatically assigned any particular value; only that one is required. Usually you have to have assigned a refvariable that value in a script. In this instance it might refer to the Player, or to a Companion if they have been granted that perk by the function mentioned above. But "PerkOwner" should cover either case.

 

-Dubious-

Link to comment
Share on other sites

  • Recently Browsing   0 members

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