Jump to content

Scripting Help


DimitrilAerinil

Recommended Posts

First off sorry if this is the wrong place for this.

 

On to my issue. I'm currently working on an eventually very large dungeon mod and I find myself needing some scripting knowledge. I've read over the Bethesda's entire Papyrus scripting tutorials and still find myself rather confused. If anyone knows where I can find a MUCH better scripting tutorial as I'm trying to create activators such as the doomstones that can teleport a player to a specified location with the same cell.

 

Any help anyone here can provide would be most appreciated. Thanks in advance. :)

Link to comment
Share on other sites

The best way to learn is to open up existing files and experiment.

 

For doomstones you want to create an activator and attach a script with the OnActivate event. Open up any button, chain or anything else and have a look at its script.

 

Good luck

Link to comment
Share on other sites

Put a XMarker in the place you want to teleport.

 

Then put an activator stone and attach this script

 

Scriptname TeleportSCR extends ObjectReference

ObjectReference property TeleDest auto

Event OnActivate(ObjectReference akActionRef)
    akActionRef.MoveTo(TeleDest)
EndEvent

 

compile and exit, then double click the script, click the "TeleDest" property and click "edit value", find the reference for your Xmarker.

 

This script will teleport ANYONE activating the stone.

 

If you want to limit it to the player, then use this

 

Scriptname TeleportSCR extends ObjectReference

ObjectReference property TeleDest auto

Event OnActivate(ObjectReference akActionRef)
    if akActionRef == Game.GetPlayer()
          Game.GetPlayer().MoveTo(TeleDest)
    endif
EndEvent

 

Attach this script to every stone and just modify the property with different XMarkers

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...