Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

The Nether/Portable Homes


Zabre
 Share

Recommended Posts

Im trying to make a spell that teleports the player between a portable home i have made.

Im not good with spell scripts, so that's why i made this topic.

I took a look at the script used in "The Nether" to take the player to the home.


ScriptName 00TeleportPlayerToTheNether


Begin ScriptEffectStart

	if (AATeleportNTHR == 0)	

		MarkerRatB.MoveTo player

	endif

End


Begin ScriptEffectFinish

	playSound DRSOblivionGateOpen

	if (AATeleportNTHR == 0)	

		set AATeleportNTHR to 1		

		player.MoveTo MarkerRatA


	else

		set AATeleportNTHR to 0		

		player.MoveTo MarkerRatB

	endif

End

By this script, im guessing that it moves a static object to the players location, then transfers the player to a static object in the house. And when the player casts the spell inside the nether, it transfers the player back to the first moved object.

Am I correct? I need help... I'm rusty with scripting :trophy:

Link to comment
Share on other sites

The reference name 'MarkerRatB' would go on a 'dead rat that you place in the world, set as intially disabled'.

When you cast the spell, the rat is moved to the player. Why? Because creatures do not have problems with the 'moveTo' command where static objects do.

When the spell finishes, it plays a sound, then checks a variable. The first time its cast, it sends the player to the home where the 'MarkerRatA' marker rat was placed (another dead disabled rat). The second time its cast, it sends the player back to where they had come from via the rat that was moved to the player.

:trophy: Smarty Says: If you have shivering isles installed, using this spell WILL cause dialoge problems.

Link to comment
Share on other sites

The reference name 'MarkerRatB' would go on a 'dead rat that you place in the world, set as intially disabled'.

When you cast the spell, the rat is moved to the player. Why? Because creatures do not have problems with the 'moveTo' command where static objects do.

When the spell finishes, it plays a sound, then checks a variable. The first time its cast, it sends the player to the home where the 'MarkerRatA' marker rat was placed (another dead disabled rat). The second time its cast, it sends the player back to where they had come from via the rat that was moved to the player.

:smarty:Smarty Says: If you have shivering isles installed, using this spell WILL cause dialoge problems.

I have SI installed, and no problems have come up...

I'll go type up a script and get back to you. >.< Sorry for the wait

Link to comment
Share on other sites

If you are in shivering isles and cast the spell and go back to Cyrodiil, the people in Cyrodiil will only say 'NO DIALOGE'. And Vice-Versa.

Is there any work around this? Or should i post that as a warning when i release the mod?

Link to comment
Share on other sites

I mentioned it because its a known issue. I put code in my Ancient Towers teleport scripts that will sucessfully handle the problem. But it also requires SI.

		;***Player is entering the Shivering Isles
setPlayerInSEWorld 1
;***Turns OFF jail markers in Tamriel and turns ON jail markers in SE
SEJailMarkerParentTamriel.Disable
SEJailMarkerCrucible.Enable
SEJailMarkerBliss.Enable
SEPrisonMarkerAichan.Enable
SEPrisonMarkerCorpserot.Enable[/code]

Revers the enable/disable states for going into Cyrodiil.

Link to comment
Share on other sites

		;***Player is entering the Shivering Isles

		setPlayerInSEWorld 1

		;***Turns OFF jail markers in Tamriel and turns ON jail markers in SE

		SEJailMarkerParentTamriel.Disable

		SEJailMarkerCrucible.Enable

		SEJailMarkerBliss.Enable

		SEPrisonMarkerAichan.Enable

		SEPrisonMarkerCorpserot.Enable
So, how would i incorporate that into my script? :smarty:

ScriptName aavLEMTeleportToHouse


Begin ScriptEffectStart

        if (aavLEMInHouse == 0)        

                aavLEMMarkB.MoveTo player

        endif

End


Begin ScriptEffectFinish

        if (aavLEMInHouse == 0)        

                set aavLEMInHouse to 1         

                player.MoveTo aavLEMMarkA


        else

                set aavLEMInHouse to 0         

                player.MoveTo aavLEMMarkB

        endif

End

Link to comment
Share on other sites

If I understand which way your script works :smarty:, I've never dealt with SI before, but Something like this:

ScriptName aavLEMTeleportToHouse

Begin ScriptEffectStart
if (aavLEMInHouse == 0)
aavLEMMarkB.MoveTo player
endif
End

Begin ScriptEffectFinish
if (aavLEMInHouse == 0)
set aavLEMInHouse to 1
player.MoveTo aavLEMMarkA
setPlayerInSEWorld 1
SEJailMarkerParentTamriel.Disable
SEJailMarkerCrucible.Enable
SEJailMarkerBliss.Enable
SEPrisonMarkerAichan.Enable
SEPrisonMarkerCorpserot.Enable
else
set aavLEMInHouse to 0
player.MoveTo aavLEMMarkB
setPlayerInSEWorld 0
SEJailMarkerParentTamriel.Enable
SEJailMarkerCrucible.Enable
SEJailMarkerBliss.Disable
SEPrisonMarkerAichan.Disable
SEPrisonMarkerCorpserot.Disable
endif
End
[/code]

Link to comment
Share on other sites

From what I understand:

If the player is not in the house (aavLEMInHouse == 0):

- move aavLEMMarkB to player location (in the world)

- move player to aavLEMMarkA (I suppose this is the marker inside the house)

If the player is in the house (aavLEMInHouse == 1):

- move player to aavLEMMarkB (where player came from)

Remarks:

- fast travel from the house should be disabled so the spell works right.

- without any other way to travel to a location other than where the player came from, how is that supposed to make the player appear in Cyrodiil instead of SI, and vice-versa?

(edit: I got it. LAME or other teleportation spells.)

Then again, best bet is to warn user to not use any other teleportation spells or you are going to have to fix the spell in case other teleportation method is used.

(@Willie:

quick looking at AncientSpellTeleportScript, your SI checks are also bypassed in case player uses custom teleportation, am I wrong?)

Edited by ulrim
Link to comment
Share on other sites

The Ancient Towers script uses a message box to let the player decide where they want to go including going back to where they 'came from'.

Your script only allows to and from your house with no other choice and in no other order than that.

If I were you, I would use a message box with 2 options, teleport to house and teleport back from wence you came.

Link to comment
Share on other sites

The mod already required SI.

Final Script (Tested and it works)


ScriptName aavLEMTeleportToHouse


Begin ScriptEffectStart

        if (aavLEMInHouse == 0)        

                aavLEMMarkB.MoveTo player

        endif

End


Begin ScriptEffectFinish

        if (aavLEMInHouse == 0)        

	     set aavLEMInHouse to 1         

	     player.MoveTo aavLEMMarkA

	     setPlayerInSEWorld 1

	     SEJailMarkerParentTamriel.Disable

             SEJailMarkerCrucible.Enable

             SEJailMarkerBliss.Enable

             SEPrisonMarkerAichan.Enable

	     SEPrisonMarkerCorpserot.Enable


        else

	     set aavLEMInHouse to 0

	     player.MoveTo aavLEMMarkA

	     setPlayerInSEWorld 0

	     SEJailMarkerParentTamriel.Enable

	     SEJailMarkerCrucible.Disable

	     SEJailMarkerBliss.Disable

	     SEPrisonMarkerAichan.Disable

	     SEPrisonMarkerCorpserot.Disable 

	     player.MoveTo aavLEMMarkB

        endif

End

Thanks Willie, and IS!

(Problem solved, go ahead and lock it :rolleyes: )

Edited by Lemon
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...