Open main menu
Home
Random
Log in
Settings
About the CreationKit Wiki
Disclaimers
the CreationKit Wiki
Search
Editing
Complete Example Scripts/ru
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Move an Object to a Specific Location Without Fade= You can use this script to make an activator or actor move without fading out in any way (moveTo and setPosition cause fading to occur). Use this to make objects fly around or make the player move continuously to a destination without fade. ''This example moves the player, for your entertainment.'' * To move something other than player, add a property of type ObjectReference and set it to the actor or activator that you want to move (I have not succeeded in moving statics, only activators and actors) * Use different Events freely, this event is used for simplicity and easy demonstration. <syntaxhighlight lang="papyrus">ScriptName MoveObjExample extends ObjectReference ObjectReference property dest auto Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() akActionRef.TranslateToRef(dest,500) ; 500 is the speed value, it's pretty fast endif EndEvent </syntaxhighlight> '''To Make This Script Work''' * Make an XMarkerHeading object (search *All with "xmarker" filter), place it where you want the player to be moved to. * Click on an object in your cell and select the Trigger Volume button, the T with a box around it * Move the orange box to where you want the player to start their controlled movement to the XMarkerHeading destination. * Add this script above to the orange box/trigger volume that you created. * SET THE PROPERTY of the script instance, dest, to be your XMarkerHeading that you just made. This example will not work if you do not set the property as I mention just above, this is an easy thing to forget in this new and wonderful language. Get used to these basics and you will find Papyrus much more powerful than prior scripting languages.
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)