Spell for new door

Post » Fri May 27, 2011 10:12 am

How would i go about designing a spell that when the player activates it (say in the Tamriel worldspace), a door appears in front of them, this door is to lead to another worldspace that i have created.
How would i do this?
Any help will be greatly appreciated.
Or if you can direct be to a mod that already uses this that will be great as well!
Thanks.
User avatar
Katharine Newton
 
Posts: 3318
Joined: Tue Jun 13, 2006 12:33 pm

Post » Fri May 27, 2011 4:14 pm

SCN {PlaceYourScriptNameHere}Begin ScriptEffectFinish	{DoorRef}.MoveTo Player 100, 0, 0End

    What you'll need to do for this to work:
  • Place a door with a reference ID (replace all mentions of {DoorRef} with the reference ID you give to the door) that is linked to the door you want it to.
  • Add that script to a spell (Add a ScriptEffect element, with a range of Self and a duration of 0)
There might be a few errors though. For one, the door will constantly be placed exactly 100 units to one side of the player. This does NOT always put it infront of the player; as they could be facing any direction. It could also place it inside an object or behind a wall if the player is in any place without 100 units room. This would happen even if it was always put in front of the player anyhow. Also, the door won't be able to be returned through, as the marker cannot contain a Reference ID to make it move around via script. If it is necessary that door needs to work both ways, then this is possible, but slightly trickier to set up (so is the putting it always in front of where ever the player is looking, but it's quite a lot more complicated).
Just to mention, this door will not disappear after however long; and may also be used to block enemies or passages (either accidentally or on purpose as a bug).

Always a few annoying things to consider, 'eh?
User avatar
Reanan-Marie Olsen
 
Posts: 3386
Joined: Thu Mar 01, 2007 6:12 am


Return to IV - Oblivion