Issue #26841: FXfakeCritterScript adds to Game.GetPlayer() instead of akActionRef
Here's critter.psc for reference:
EVENT onActivate(objectReference actronaut) if (bKilled == false) bKilled = true disableAndDelete(false) ; Nuke the critter as early as possible so the player knows something happened ;Player receives loot for direct activation? Probably need a bool here for other critters in future if nonIngredientLootable ; do I have the optional non-ingredient lootable parameter set? actronaut.additem(nonIngredientLootable, lootableCount) else actronaut.addItem(lootable, lootableCount) endif if bIncrementsWingPluckStat == TRUE game.IncrementStat("Wings Plucked", lootableCount) endif endIf endEVENTHere, the loot is added to the object that activated the critter. This could be the player, obviously, but it also allows for e.g. a script to force a companion to go loot the object, which properly adds the ingredients to the activating object.
And here's FXfakeCritterScript.psc:
Event OnActivate(ObjectReference akActionRef) self.disable() if myFood game.getplayer().additem(myFood, numberOfIngredientsOnCatch) endif if myIngredient game.getplayer().additem(myIngredient, numberOfIngredientsOnCatch) endif RegisterForSingleUpdateGameTime(hoursBeforeReset) ;! utility.waitGameTime(hoursBeforeReset) ;! readyToReset = TRUE EndEventIn this one, the loot is added to game.getplayer() instead of just using akActionRef like it should, which is both slower and less flexible.
(semi-related note, and already fixed, but utility.waitGameTime() to reset the object? Really, Bethesda?)