SandMouseAnarchy Posted May 16, 2020 Share Posted May 16, 2020 De ja vu... I'm trying to listen for a certain object mod being added to my power armor while im in the power armor workbench menu. not sure of the best way to do it. This is what i have so far...(this script is attatched to a refrence alias in a quest)("TESTKWD" keyword is attached to an object mod that is crafted in the power armor workbench) Scriptname MPA_KWDTEST extends ReferenceAlias Keyword Property TESTKWD Auto Keyword Property powerArmorFurnitureKW Auto Event OnInit() RegisterForTutorialEvent("PowerArmorWorkbenchEntered") EndEvent Event OnTutorialEvent(String asEventName, Message aMessage) if asEventName == "PowerArmorWorkbenchEntered" Debug.Notification("Entered workbench") RegisterForTutorialEvent("moddingSuccesss") EndIf if asEventName == "moddingSuccess" Debug.Notification("modding sucess") ObjectReference[] nearbyPowerArmors = Game.GetPlayer().FindAllReferencesWithKeyword(powerArmorFurnitureKW, 200.0) If nearbyPowerArmors.Length > 0 ObjectReference nearestPowerArmor float fnearestDistance = 9999.0 int i = 0 while (i < nearbyPowerArmors.Length) float fcurrentDistance = Game.GetPlayer().GetDistance(nearbyPowerArmors[i]) if( fcurrentDistance < fnearestDistance ) nearestPowerArmor = nearbyPowerArmors[i] fnearestDistance = fcurrentDistance endIf i = i + 1 endWhile if(nearestPowerArmor) If nearestPowerArmor.HasKeyword(TESTKWD) Debug.Notification("TESTKWD Found!") EndIf EndIf Endif EndIf EndEvent im not getting the "modding succsess" debug, and im not getting the "TESTKWD Found" debug either. Anyone know how i can listen for my keyword/Omod being added to the power armor? Link to comment Share on other sites More sharing options...
DieFeM Posted May 16, 2020 Share Posted May 16, 2020 I would start by checking the spelling. Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted May 16, 2020 Author Share Posted May 16, 2020 (edited) Well damn. I made the corrections to the spelling - and... It still doesn't work. Edited May 16, 2020 by SandMouseAnarchy Link to comment Share on other sites More sharing options...
octodecoy Posted May 16, 2020 Share Posted May 16, 2020 When the power armor is in the workbench, the powerArmorFurnitureKW gets removed, so instead you might want to find the workbench and check if that has your keyword, as I believe the "workbenchKeyword" gets added to the power armor itself making it a workbench. Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted May 17, 2020 Author Share Posted May 17, 2020 Octodecoy - that's a really great point! Unfortunately I'm still not able to get a debug from: if asEventName == "moddingSuccess" Debug.Notification("modding success") Any ideas why? Link to comment Share on other sites More sharing options...
octodecoy Posted May 17, 2020 Share Posted May 17, 2020 I'm not sure...see if you can get it from other workbench types (the "moddingsuccess" debug I mean), maybe it doesn't get sent from power armor workbenches or something. Also, I've had trouble before with getting certain tutorial events to fire, mainly "PowerArmorWorkenchExited", I may have done it wrong when I tried...but I could not get that to fire, ever. You could also try OnPlayerModArmorWeapon event instead, though I'm not sure if that would do exactly what you want. Because I couldn't get "PowerArmorWorkenchExited" to fire before, I instead used: bool InWorkbench = False Event Actor.OnPlayerUseWorkBench(Actor akSender, ObjectReference akWorkBench) If (akWorkBench.HasKeyword(AnimFurnWorkbenchPowerArmor)) If (InWorkbench == False) InWorkbench = True RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerModArmorWeapon") ElseIf (InWorkbench == True) InWorkbench = False UnRegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerModArmorWeapon") EndIf EndIf EndEvent It's not perfect and could be done better I'm sure but it always fired on Enter/Exit, and the "OnPlayerModArmorWeapon" always fired when I created or attached a mod to the frame. (The above was attached to a quest by the way.) Edit: Also you might want to try ""ModdingSuccess", but I don't know if the capitalization matters, that's just how the wiki spells it. Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted May 17, 2020 Author Share Posted May 17, 2020 Thanks for the help man, unfortunately notging seems to work - I'm just going to simplify the whole thing and move on. I think this idea, like a lot of things is just a little beyond the capabilities of the creation kit :'( Link to comment Share on other sites More sharing options...
Recommended Posts