Complete Example Scripts: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
imported>JustinOther
m (→‎Move an Object to a Specific Location Without Fade: Condensed+Removed extraneous parentheticals)
imported>Fg109
mNo edit summary
Line 240: Line 240:


'''To Make This Script Work'''
'''To Make This Script Work'''
* You must create this script on a Activator object, probably a dwemer button :)
* You must create this script on an Activator object, probably a dwemer button :)
* You must then set the property for the QST sound effect property, the sound file has the same name as the property in the script above.
* You must then set the property for the QST sound effect property, the sound file has the same name as the property in the script above.


'''To make your own dwemer button and avoid messing with the original Skyrim scripts/activators:'''  
'''To make your own dwemer button and avoid messing with the original Skyrim scripts/activators:'''  
* Extract the dwemer button .nif file from the Meshes.bsa and create a new activator using that .nif file (picking the mesh to use is an option in the activator edit window).
* Find a dwemer button in the object window and change the ID.
* You must put your extracted .nif file in the skyrim/Data/meshes directory structure if you want the Creation Kit to be able to find and use it.
* Create the changed button as a new form when prompted.
To extract files from the Skyirm .BSA files you must download something like the Fallout3 Archive Utility, do a google search for this.
* Edit the new button to remove the original script(s) and attach you own.


=Set Quest Stage When Picked Up By Player=
=Set Quest Stage When Picked Up By Player=
Line 276: Line 276:
If akActionRef == Game.GetPlayer()
If akActionRef == Game.GetPlayer()
Int iIndex = DraugrArray.Length ; Will return 30
Int iIndex = DraugrArray.Length ; Will return 30
While iIndex > 0
While iIndex >= 0
iIndex -= 1 ; 29'th element is 30'th Draugr
iIndex -= 1 ; 29'th element is 30'th Draugr
Actor rDraugr = DraugrArray[iIndex]
Actor rDraugr = DraugrArray[iIndex]
Line 459: Line 459:


Event OnInit()
Event OnInit()
    float newXOffset = XOffSet + RandomFloat(0.0, RandomOffsetX / 2)
    float newYOffset = YOffSet + RandomFloat(0.0, RandomOffsetY / 2)
    float newZOffset = ZOffSet + RandomFloat(0.0, RandomOffsetZ / 2)
     if CurrentTarget ;!= None
     if CurrentTarget ;!= None
     elseIf SpawnNode
     elseIf SpawnNode
        float newXOffset = XOffSet + RandomFloat(-RandomOffsetX, RandomOffsetX)
        float newYOffset = YOffSet + RandomFloat(-RandomOffsetY, RandomOffsetY)
        float newZOffset = ZOffSet + RandomFloat(-RandomOffsetZ, RandomOffsetZ)
         CurrentTarget = PlaceAtme(TargetType)
         CurrentTarget = PlaceAtme(TargetType)
         CurrentTarget.MoveTo(Self, newXOffSet, newYOffSet, newZOffSet)
         CurrentTarget.MoveTo(Self, newXOffSet, newYOffSet, newZOffSet)
Anonymous user

Navigation menu