Difference between revisions of "Light switch tutorial"

552 bytes added ,  19:18, 13 February 2009
m
Added summary of collision properties for the activator
imported>Puf the majic dragon
(Created a tutorial for creating a light switch)
 
imported>Puf the majic dragon
m (Added summary of collision properties for the activator)
Line 2: Line 2:


== Create Your Switch ==
== Create Your Switch ==
First you will need to create a new [[activator]] world object which will act as your switch. This can be any object you desire such as a Welkynd stone or a new mesh of your design. This tutorial uses a .nif file with only a dome shaped collision object and editor marker, which appears as an invisible object in game which the player can still interact with. Once you have created the new activator, attach the following script to it:
First you will need to create a new [[activator]] world object which will act as your switch. This can be any object you desire such as a Welkynd stone or a new mesh of your design. This tutorial uses a .nif file with only a dome shaped collision object and editor marker, which appears as an invisible object in game which the player can still interact with.
 
<pre>
If you create your own mesh, keep in mind that certain settings on the collision node in NifSkope need to be changed in order to keep the object from falling due to gravity or moving when it is bumped. In short, the "Layer" on the bhkRigidBody needs to be OL_STATIC, the "Collision Response" needs to be "RESPONSE_SIMPLE_CONTACT", and the "Motion System" needs to be "MO_SYS_FIXED". Other properties may also need to be set inside this node as well, so it is best to compare your settings to the properties of an unedited Bethesda mesh.
</pre>
 
Once you have created the new activator, attach the following script to it:


<pre>
<pre>