Jump to content

Teleport Spell Help


Recommended Posts

Does GetInSameCell work for exterior world space cells?

 

bomo99: Show us your code. It sounds like a simple script bug.

alright here is the script i have been using

ScriptName AXMTeleportToLodgeScript

Begin ScriptEffectStart
 if (AXMTeleportVar == 0) 
  AXMPlayerRef.MoveTo player
 endif
End

Begin ScriptEffectFinish
 PlaySound AXMTele
 if (AXMTeleportVar == 0) 
  set AXMTeleportVar to 1  
  Player.MoveTo AXMTeleportRef
 else
  set AXMTeleportVar to 0  
  Player.MoveTo AXMPlayerRef
 endif
End
Link to comment
Share on other sites

Looks alright. And as I modified my script to use your approach, it didn't revealed any problem too, at least if I'm using vanilla marker. Last thought for script - is its duration set to at least 1s?

 

How the bug manifests itself? I see a teleport part should always play a sound at least. Is teleporting working bad for both vanilla and modded cells after you save and quit game?

Link to comment
Share on other sites

alright found some time here are the markers that i am using for the teleport and it in action

 

i noticed something when making the video, when i used the teleport in benirus manor and teleported as in the video just as Roman says no issues even after closing the game after using it in the manor it worked which had me confused so i tried it again when out in anvil, the results are at 2:15 where it does what i have been trying to get help with, something that i want to test while i get this post up is that the Ref that moves to the player originates in the cell that i show at 2:15 so maybe that has something to do with it, ill test around and see if the results are the same

 

Edit: tried a different cell in my mod that prompts an autosave after teleport in anvil and i got the same problem so my hypothesis of the save starting in the cell the moving marker originates is not the issue, but maybe that it is that it starts out in a worldspace?

when you teleport in a cell and save, then close or CTD, then load that save, then use the spell it works fine.

Link to comment
Share on other sites

I noticed in the picture of markers that they're disabled, is there a reason for this?

 

The end of video is confusing to me - you loaded the problematic save, but you tested only the part to point two. Instead of casting the spell again to see where the cast returns you, you opened a load menu and then the video ends. It looked like you was exactly at returning point somehow (or the returning point was purged), so the spell looked like it did nothing. If you use show command to see the state of AXMTeleportVar after loading this save, do you notice something out of order?

 

Edit: I also noticed that loaded save at 2:15 was different room from what is saved at 2:00.

Edited by RomanR
Link to comment
Share on other sites

I noticed in the picture of markers that they're disabled, is there a reason for this?

 

The end of video is confusing to me - you loaded the problematic save, but you tested only the part to point two. Instead of casting the spell again to see where the cast returns you, you opened a load menu and then the video ends. It looked like you was exactly at returning point somehow (or the returning point was purged), so the spell looked like it did nothing. If you use show command to see the state of AXMTeleportVar after loading this save, do you notice something out of order?

 

Edit: I also noticed that loaded save at 2:15 was different room from what is saved at 2:00.

the reason is, is that i don't want the marker physically visable just usable, at 2:15 is same save i just went outside of benirus manor into anvil used the teleport spell, went to the house and let it autosave, closed the game, then loaded that autosave, and used the tele spell only for it to not do anything but the sound still works and to show what i was talking about. will update is the televar stays 1 after

 

Edit: when that autosave loaded, AXMTeleportVar == 1, after the spell does nothing it reverts to 0

 

just for Reference 1 means to my worldspace/AXMTeleportRef and 0 means returning to AXMPlayerRef

Link to comment
Share on other sites

Moving a marker is simply a way of storing a Transform of Position XYZ and Angle XYZ. These can be stored inside a quest script It could be Float StartX, Float StartAngleX or using OBSE stored in an array - example

 

Begin ScriptEffectStart

QstVariables.StartX = Player.GetPos X

....

End

 

Array management has a few more steps but I think you'll get the idea.

 

I went over creating dynamic teleport objects, same as Two Worlds II but never finished it.

Link to comment
Share on other sites

Moving a marker is simply a way of storing a Transform of Position XYZ and Angle XYZ. These can be stored inside a quest script It could be Float StartX, Float StartAngleX or using OBSE stored in an array - example

 

Begin ScriptEffectStart

QstVariables.StartX = Player.GetPos X

....

End

 

Array management has a few more steps but I think you'll get the idea.

 

I went over creating dynamic teleport objects, same as Two Worlds II but never finished it.

i do have a quest i can attach variables to, i have one that gives the teleport spell itself after a certain quest stage, the only thing is, is that, that quest stage if the final stage/Complete Quest, and on the result script the final thing is Stopquest, i don't know if this hurts using it, i can change it but just want a little more clarification if this will still work, the only other thing i have a question about is this part right here

QstVariables.StartX = Player.GetPos X

would the player part in this part be the Marker? or the actual player and would it need to run before or after this?

  AXMPlayerRef.MoveTo player

 

Link to comment
Share on other sites

@bomo99: "the reason is, is that i don't want the marker physically visible, just usable..."

Well, I noticed that markers using this XMarker base object are already invisible in game, enabled or not. But it seems this is some special programming, as I tried to unpack the .nif itself and assign to my created base, I got this "red x" visible in game. It's the last thing I noticed comparing yours, mine and vanilla things. Otherwise all seems OK regarding your script, after your additional notices.

 

@glowplug:

As bomo99 showed, there is a problem which looks like the first marker is completely lost. Is it possible to check this marker's residing cell without using OBSE?

Edited by RomanR
Link to comment
Share on other sites

  • Recently Browsing   0 members

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