Difference between revisions of "Talk:OnAdd"

Jump to navigation Jump to search
867 bytes added ,  16:06, 19 January 2009
Re: Haama
imported>Haama
(Notes question)
 
imported>SnakeChomp
(Re: Haama)
Line 1: Line 1:
On the notes, were the actors in the same cell as the player?
On the notes, were the actors in the same cell as the player?
<br>--[[User:Haama|Haama]] 20:07, 19 January 2009 (UTC)
<br>--[[User:Haama|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.
:--[[User:SnakeChomp|SnakeChomp]] 21:06, 19 January 2009 (UTC)
Anonymous user

Navigation menu