Difference between revisions of "Unplayable Items"

43 bytes removed ,  01:24, 20 September 2006
revert because I am rather uncertain as to the accuracy of the edit. Would Elder please comment on them so we can understand why they're being made?
imported>Elder
m
imported>DragoonWraith
(revert because I am rather uncertain as to the accuracy of the edit. Would Elder please comment on them so we can understand why they're being made?)
Line 90: Line 90:
Aside: This works equally well for basic items, etc. However, much of the time you want to introduce a persistant scripted item in to the game. This is a bit more tricky since objects easily lose their scripts when being moved from 3D (the world) to 2D (an inventory/container). To do this firstly it is a good idea to have a room of your own to hold stuff, even if you can never get to this area from inside the game. The reason is by doing this you will never cause mod conflicts. You then need to:
Aside: This works equally well for basic items, etc. However, much of the time you want to introduce a persistant scripted item in to the game. This is a bit more tricky since objects easily lose their scripts when being moved from 3D (the world) to 2D (an inventory/container). To do this firstly it is a good idea to have a room of your own to hold stuff, even if you can never get to this area from inside the game. The reason is by doing this you will never cause mod conflicts. You then need to:


(1) MyObject.MoveTo player [actually optional, depending on object]
(1) MyObject.MoveTo player  


(2) MyObject.Activate player
(2) MyObject.Activate player
Line 101: Line 101:
Tokens on the player: Very useful for OBSE key programming. It appears necessary to do this in 2 steps:
Tokens on the player: Very useful for OBSE key programming. It appears necessary to do this in 2 steps:


(1) set tokenRef to player.PlaceAtMe MyPlayerToken 1
(1) set tokenRef to player.AddItem MyPlayerToken 1


(2) tokenRef.Activate player
(2) tokenRef.Activate player