TheRizzler1 Posted August 19, 2016 Author Share Posted August 19, 2016 I've come back to this problem since it's one of the last things that needs doing before an update and am still not able to figure out where I might be going wrong. If I do the Quest Alias route, is it still 'extends Weapon'? Does it matter if it's Const? How will the game know to only apply the function when the correct weapon is out?I don't have the time to invest into learning papyrus and I don't think looking for a dedicated scripter is necessary either since I only want to do a few things. Link to comment Share on other sites More sharing options...
TummaSuklaa Posted August 20, 2016 Share Posted August 20, 2016 For a quest alias the script needs to extend ReferenceAlias. Doesn't need to be const. Link to comment Share on other sites More sharing options...
TheRizzler1 Posted August 20, 2016 Author Share Posted August 20, 2016 (edited) Thanks, but still, no luck. Nothing seems to be happening inside power armour or not. The current script: Scriptname MagnumRevolverRifle_APPenalty extends ReferenceAlias string WeaponFireAnimation = "weaponFire" Const int ValueCost = 5 Const ; Maybe a GlobalVariable for customizability? ActorValue Property ValueType Auto Const Mandatory ; you must "fill" this in the CK Event OnInit() Actor kActor = Game.GetPlayer() RegisterForRemoteEvent(kActor, "OnEquipped") RegisterForRemoteEvent(kActor, "OnUnequipped") EndEvent Event ObjectReference.OnEquipped(ObjectReference akSender, Actor akActor) self.RegisterForAnimationEvent(akSender, WeaponFireAnimation) EndEvent Event ObjectReference.OnUnequipped(ObjectReference akSender, Actor akActor) self.UnregisterForAnimationEvent(akSender, WeaponFireAnimation) EndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) Actor kSubject = akSource as Actor If (kSubject) If !(kSubject.IsInPowerArmor()) ; not in power armor kSubject.DamageValue(ValueType, ValueCost) EndIf EndIf EndEvent Quest Data tab / Quest Alias tab I think I need a step by step, as I'm not sure I've done everything right myself. Edited August 20, 2016 by TheRizzler1 Link to comment Share on other sites More sharing options...
scrivener07 Posted August 20, 2016 Share Posted August 20, 2016 I continued to work on this script for a while and it turned out to be difficult. When the player enters power armor the players base RACE changes to the power armor race. This change makes animation events registered on the Player "HumanRace" invalid. You have to register for animations when the race changes. I found "Event Actor.OnRaceSwitchComplete(Actor akSender)" but I cannot get it to work as expected. Link to comment Share on other sites More sharing options...
TheRizzler1 Posted August 20, 2016 Author Share Posted August 20, 2016 (edited) Thankyou for your efforts. That does sound more complicated than previously envisioned :/I might push out the next update and hopefully figure this scripting stuff out in the meantime, as it's the last thing that needs doing Edited August 20, 2016 by TheRizzler1 Link to comment Share on other sites More sharing options...
Recommended Posts