Difference between revisions of "Talk:OnAdd"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>SnakeChomp
(Re: Haama)
imported>Cipscis
(Re: On the notes)
Line 5: Line 5:
:I am going to play around more when I am home to see if I can use a gamemode script with a timer to add an item shortly after the actor spawns using AddItem (which will trigger the OnAdd block). My previous experiments with this showed that a gamemode block on an item script calling additem on its container would freeze the game, but it may be because the item I was adding also called RemoveMe in its OnAdd block. I hope to find a workaround for this.
:I am going to play around more when I am home to see if I can use a gamemode script with a timer to add an item shortly after the actor spawns using AddItem (which will trigger the OnAdd block). My previous experiments with this showed that a gamemode block on an item script calling additem on its container would freeze the game, but it may be because the item I was adding also called RemoveMe in its OnAdd block. I hope to find a workaround for this.
:--[[User:SnakeChomp|SnakeChomp]] 21:06, 19 January 2009 (UTC)
:--[[User:SnakeChomp|SnakeChomp]] 21:06, 19 January 2009 (UTC)
::For the note that I added, about the Death Items, they were.  I tried it with and without the player killing them, and it seems to be true for regular Death Items and for those added via perks like Contract Killer.<br />It's not all bad, you can use it to tell when the item is first removed from its container.<br />-- [[User:Cipscis|Cipscis]] 21:08, 19 January 2009 (UTC)

Revision as of 16:08, 19 January 2009

On the notes, were the actors in the same cell as the player?
--Haama 20:07, 19 January 2009 (UTC)

No, I added the test actors to a random house interior I had never been to and traveled there with coc. OnAdd blocks simply won't execute for items placed into NPC inventories when they initially spawn (or their inventory is regenerated via SetLevel or ResetInventory), or added as death items. It is most unfortunate behavior indeed. =(
I am going to play around more when I am home to see if I can use a gamemode script with a timer to add an item shortly after the actor spawns using AddItem (which will trigger the OnAdd block). My previous experiments with this showed that a gamemode block on an item script calling additem on its container would freeze the game, but it may be because the item I was adding also called RemoveMe in its OnAdd block. I hope to find a workaround for this.
--SnakeChomp 21:06, 19 January 2009 (UTC)
For the note that I added, about the Death Items, they were. I tried it with and without the player killing them, and it seems to be true for regular Death Items and for those added via perks like Contract Killer.
It's not all bad, you can use it to tell when the item is first removed from its container.
-- Cipscis 21:08, 19 January 2009 (UTC)