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 | * 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:''' | ||
* | * Find a dwemer button in the object window and change the ID. | ||
* Create the changed button as a new form when prompted. | |||
* 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() | ||
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) | ||