Yamatohime Posted January 5, 2019 Share Posted January 5, 2019 (edited) 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 January 5, 2019 by Yamatohime Link to comment Share on other sites More sharing options...
dubiousintent Posted January 5, 2019 Share Posted January 5, 2019 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 More sharing options...
Yamatohime Posted January 5, 2019 Author Share Posted January 5, 2019 Since it is ActorRef... It points to PerkOwner condition of Perk Entry (in basic case it is a player I think)? Link to comment Share on other sites More sharing options...
dubiousintent Posted January 5, 2019 Share Posted January 5, 2019 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 More sharing options...
Recommended Posts