Difference between revisions of "MessageBox Tutorial/Token Scripts"

Jump to navigation Jump to search
m
imported>UDUN
imported>UDUN
 
* While it is not absolutely necessary to remove the token, it does make scripting easier as there is a clear beginning and a clear end. If you want to keep the token (for instance, to keep the variables on it), then you can remove it to a remote container (RemoveMe RemoteCont), and move it back to the player when you want to use it again. There are 2 ways to move it back to the player:
# Use '''''RemoteCont.RemoveAllItems player'''''. [[RemoveAllItems]] will only move Playable items. You can use this if each token is a unique item (unique FormID) and a piece of clothing. Use [[SetIsPlayable]] (OBSE v.0012) to toggle the items between Playable and Unplayable.
# Otherwise, you can mark each token with a unique number (set a short variable). This number can be used to determine if the token should remove itself back to the player ('''''RemoveMe player'''''). Make each token check a persistent variable (global, quest variable, or persistent object variable) every frame, and load the removeremote container by setting a variable on it or moving it to the player (be sure to move it back afterwards).
<pre>short ID
 
Anonymous user

Navigation menu