Jump to content

Small Scripting Syntax Help


CrimsonOmegaLance

Recommended Posts

my Script:

This is a script on a door. Basically what it's supposed to do is change the teleport destination on the door so you can't leave the area until you do a certain part of the quest. I'm getting an error on line 9, which is the xLBMaeraDoor.SetDoorTeleport TeleportTo:xLBMaeraLockedDoorReturn bTemporary 1 line.

 

I'm using CS loaded with OBSE and the function I'm using is: http://cs.elderscrolls.com/index.php/SetDoorTeleport.

I'm assuming my syntax is wrong, can someone point what it should be?

xLBMaeraLockedDoorReturn is an X-marker.

 

scn xLBMaeraDoorScript

 

short locked

 

 

begin onActivate

;locked, return player to house, give them a msg box

if (locked == 1)

xLBMaeraDoor.SetDoorTeleport TeleportTo:xLBMaeraLockedDoorReturn bTemporary 1

MessageBox "Everytime I try to leave, something brings me back... the Gods must want me to become a bitch.","Ok"

endif

 

end

 

 

edit: The error is: Item 'TeleportTo' not found for parameter linked door.

 

edit2: Got it... this is pretty damn hard to figure out for a newbie. the line should have read: reference.SetDoorTeleport reference. and both references have to be doors.

Link to comment

Another thing to remember is that if you add an OnActivate block to a door, it overrides the default activation block.

So, generally, you have to somewhere call Activate if the door is unlocked. Heck, to be perfectly honest, you shouldn't need to change the teleport destination at all. Since an OnActivate block blocks Activation until you call Activate, can probably do the following...

 

 

scn xLBMaeraDoorScript

short locked

begin onActivate
   if (locked == 1)
       MessageBox "Everytime I try to leave, something brings me back... the Gods must want me to become a bitch.","Ok"
   else
       Activate
   endif
end

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use