Complete Example Scripts: Difference between revisions
Jump to navigation
Jump to search
→Move an Object to a Specific Location Without Fade: Mode capitalisation etc. consistent, updated to correctly use GetPosition functions, and corrected syntax of line breaks mid-function call
imported>Evernewjoy |
imported>Cipscis (→Move an Object to a Specific Location Without Fade: Mode capitalisation etc. consistent, updated to correctly use GetPosition functions, and corrected syntax of line breaks mid-function call) |
||
| Line 71: | Line 71: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
ScriptName MoveObjExample extends ObjectReference | |||
ObjectReference property dest auto | ObjectReference property dest auto | ||
Event | Event OnTriggerEnter(ObjectReference akActionRef) | ||
if (akActionRef == Game.GetPlayer()) | |||
akActionRef.TranslateTo(dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), \ | |||
dest.GetAngleX(), dest.GetAngleY(), dest.GetAngleZ(), 500) ; 500 is the speed value, and it's pretty fast | |||
endif | |||
EndEvent | |||
</source> | </source> | ||