Jump to content

Player short and long range teleportation by activator?


Recommended Posts

Forgive me if I'm about to ask really, really stupid questions. My situation; I'm making a mod. I can mentally parse papyrus, I understand what's happening and can see what a script is doing. But drawing one up from scratch just ends in a huge mental block, and... yeah. I'm very familiar with CK and the various classes of items but reference management and script activation is still fuzzy.

 

I'm attempting to create, as an initial test in one cell, teleport buttons. Using ConButtonStand01 (which already has Default1StateActivator script), I've made TeleportButton01 and 02, and then set down XMarkerHeadings named TeleportMarker01 and TeleportMarker02. Marker 02 is 'behind' and oriented at button 01, and marker 01 is likewise for button 02.

 

The intended result is that the player presses button 01 and pops into existence facing button 02, several hundred units away. I'm aware of the default 800 unit load screen default and potentially using TranslateToRef instead of MoveToRef, but let's focus on MoveToRef.

 

I assume I'm to link the marker ref to the button, then go into the script tab on the TeleportButton object and... I suddenly have no idea what I'm doing.

 

Have a good tutorial link that fits the situation? Once I have some idea what I'm doing and *why* it works that way I'm pretty good about taking off, which is good since there are other 1 state activated items I'll need to make scripts for (interlocked doors in an airlock, that sort of thing).

 

I'll eventually need to script for teleporting across cells to a single marker from any location, using an object in inventory... possibly by playing a holotape, but am open to ideas on how best to manage that type of situation where the player does something that 'recalls' them to a single specific, unchanging location.

Link to comment
Share on other sites

OK, I got it functioning... I was making it much more complicated in my mind than it actually was.

 

Added script in activator's object edit pane, gave it a name, wrote in following (ex, I've been playing with this and tried translateToRef, moveTo works fine)

Scriptname M1V201TestTeleportScript2 extends ObjectReference

actor property playerRef auto
objectreference property MVTestTeleMarker1 auto 
event onActivate(ObjectReference TriggerRef)
	playerRef.TranslateToRef(MVTestTeleMarker1,5000.0)
endEvent

... and then just assigned the references from the script properties screen. Easy enough, though I tried a countdown with debug.notification and utility.wait that doesn't work quite right.

 

Time to play around, I suppose. I do understand that using MoveTo with an unloaded reference requires a bit more backend work, and that'll be part and parcel of the end usage.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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