IsharaMeradin Posted November 22, 2013 Share Posted November 22, 2013 @armadocThe reported errorno viable alternative at input '\\r\\n'in your specific case refers to the following If (AkCaster.Getincell == JLV3Arcadia) && (AkCaster.Getincell == JLV3ArcadiaTemple) && (AkCaster.Getincell == JLV3ArcadiaHome)You did not include () after GetInCell. Papyrus needs that or it will complain and not compile. Link to comment Share on other sites More sharing options...
Sylux113 Posted November 23, 2013 Share Posted November 23, 2013 Can't you just create a bool variable "IsHome"?When the mod first is started you can be sure that the player is not in your target cell so you can initiate that variable as false. Then, as long as there is no other way from or to your cell you can just check "IsHome", teleport the player accordingly and change the variable. Link to comment Share on other sites More sharing options...
armadoc Posted November 23, 2013 Share Posted November 23, 2013 IsharaMeradin Posted "You did not include () after GetInCell. Papyrus needs that or it will complain and not compile." Scriptname JLV3ArcanistTeleportHomeScript extends activemagiceffect{Teleport Home}ObjectReference Property JLV3ArcanistReturnMarker AutoobjectReference Property JLV3ArcanistTeleHome AutoWorldspace Property JLV3Arcadia AutoWorldspace Property JLV3ArcadiaHome AutoWorldspace Property JLV3ArcadiaTemple AutoMessage Property MessageError Auto;Message Box, Can not Teleport in the VoidActor Property PlayerREF AutoEvent OnEffectFinish(Actor akCaster, Actor akTarget)If (AkCaster.Getincell () == JLV3Arcadia) && (AkCaster.Getincell () == JLV3ArcadiaTemple) && (AkCaster.Getincell () == JLV3ArcadiaHome)ElseifJLV3ArcanistReturnMarker.MoveTo(PlayerREF, 0.0, 0.0,0.0)AkCaster.Moveto (JLV3ArcanistTeleHome)EndifEndevent-----------------------------Starting 1 compile threads for 1 files...Compiling "JLV3ArcanistTeleportHomeScript"...C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\JLV3ArcanistTeleportHomeScript.psc(13,6): no viable alternative at input '\\r\\n'No output generated for JLV3ArcanistTeleportHomeScript, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on JLV3ArcanistTeleportHomeScript Do not fully understand this. I must be missing something stupid. Link to comment Share on other sites More sharing options...
armadoc Posted November 23, 2013 Share Posted November 23, 2013 Scriptname JLV3ArcanistTeleportHomeScript extends activemagiceffect ObjectReference Property returnMarker Auto objectReference Property homeMarker Auto Keyword Property locationKeyword Auto event OnEffectStart(Actor akCaster, Actor akTarget) Location curLoc = akCaster.GetCurrentLocation() if(!curLoc.HasKeyword(locationKeyword)) returnMarker.MoveTo(akCaster) akCaster.MoveTo(homeMarker) else akCaster.MoveTo(returnMarker) endif endeventIf you cast it outside of home it will teleport home, if you cast it in home it will teleport back. locationKeyword is a new keyword you must create and add to the location of your homes. YOU ARE A GENIUS. It worked Better than I hoped. I thought this would take hours, yet with this script and: Scriptname JLV3ArcanistTeleportReturnScript extends activemagiceffect ObjectReference Property JLV3ArcadiareturnMarker AutoEvent OnEffectStart(Actor akCaster, Actor akTarget) AkCaster.MoveTo(JLV3ArcadiareturnMarker, 0.0, 0.0, 0.0)EndEvent It worked beautifully. To all that assisted, thank you. Thank you so very much. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 23, 2013 Share Posted November 23, 2013 IsharaMeradin Posted "You did not include () after GetInCell. Papyrus needs that or it will complain and not compile." Scriptname JLV3ArcanistTeleportHomeScript extends activemagiceffect{Teleport Home}ObjectReference Property JLV3ArcanistReturnMarker AutoobjectReference Property JLV3ArcanistTeleHome AutoWorldspace Property JLV3Arcadia AutoWorldspace Property JLV3ArcadiaHome AutoWorldspace Property JLV3ArcadiaTemple AutoMessage Property MessageError Auto;Message Box, Can not Teleport in the VoidActor Property PlayerREF AutoEvent OnEffectFinish(Actor akCaster, Actor akTarget)If (AkCaster.Getincell () == JLV3Arcadia) && (AkCaster.Getincell () == JLV3ArcadiaTemple) && (AkCaster.Getincell () == JLV3ArcadiaHome)ElseifJLV3ArcanistReturnMarker.MoveTo(PlayerREF, 0.0, 0.0,0.0)AkCaster.Moveto (JLV3ArcanistTeleHome)EndifEndevent-----------------------------Starting 1 compile threads for 1 files...Compiling "JLV3ArcanistTeleportHomeScript"...C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\JLV3ArcanistTeleportHomeScript.psc(13,6): no viable alternative at input '\\r\\n'No output generated for JLV3ArcanistTeleportHomeScript, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on JLV3ArcanistTeleportHomeScript Do not fully understand this. I must be missing something stupid.Still the same error. GetInCell() not GetInCell ()Papyrus is very fickle about spacing. Somethings you can get away with a space between, but a lot of things you cannot. This is one of those that you cannot. At any rate, looks like you have something working that is done in a different method than you were originally trying. At least, you've learned something in the process. Hopefully. Link to comment Share on other sites More sharing options...
Vega1942 Posted October 2, 2015 Share Posted October 2, 2015 how do I set the property for the "returnMarker" ? Link to comment Share on other sites More sharing options...
Jinxxed0 Posted November 6, 2016 Share Posted November 6, 2016 (edited) I really hate to necro a thread, but I want to ask the same thing Vega1942 asked. I can get myself teleported to the play house i'm making, but I can't teleport out. so what do we need for the returnMarker? If it matters here's what i have: Scriptname AAA0_Academy_Teleport_Script extends activemagiceffect ObjectReference Property returnMarker Auto ObjectReference Property homeMarker Auto Keyword Property locationAcademy Auto Event OnEffectStart(Actor akCaster, Actor akTarget) Location curLoc = akCaster.GetCurrentLocation() if(!curLoc.HasKeyword(locationAcademy)) returnMarker.MoveTo(akCaster) akCaster.MoveTo(homeMarker) Else akCaster.MoveTo(returnMarker, 0.0, 0.0, 0.0) Endif EndEvent With this, I can teleport to the location just fine, but I can't teleport back out. The magic effect just plays and does nothing. I don't know anything about scripts at all. Edited November 6, 2016 by Jinxxed0 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 6, 2016 Share Posted November 6, 2016 @Jinxxed0For your script, you will be putting an xMarker in a cell somewhere (preferably one of your own cells). You then assign that placed reference to the 'returnMarker' property. What the script will do is move that xMarker to the player's current location and teleport the player. Then when you teleport out, the player will be put on the xMarker that was moved. The xMarker will stay at that point until the next time the player wants to teleport and then the xMarker will move to that position. Link to comment Share on other sites More sharing options...
Jinxxed0 Posted November 7, 2016 Share Posted November 7, 2016 @Jinxxed0For your script, you will be putting an xMarker in a cell somewhere (preferably one of your own cells). You then assign that placed reference to the 'returnMarker' property. What the script will do is move that xMarker to the player's current location and teleport the player. Then when you teleport out, the player will be put on the xMarker that was moved. The xMarker will stay at that point until the next time the player wants to teleport and then the xMarker will move to that position.ah ha! I see. thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts