Jump to content

Script: Sleep, Enter Zone, Conversation


Mehra

Recommended Posts

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

Back again. Sorry lol. Rather learn this slowly than just expect someone to do the code for me. Ok, so I put the first three pos lines in. How do I affix them to the returning teleport?
Link to comment
Share on other sites

Problem is: someone please help me with a script to mark a player's current location, and an automatic recall to that position. Scenario is, player goes to sleep, journal update, player is woken up, transported to a "dream world", automatic coversation with npc, followed by a journal update, and then recalled to original sleeping area.

 

I have everything but the mark/recall worked out. Thank you.

Edited by Mehra
Link to comment
Share on other sites

Pretty easy for your latest question. I didn't browse through the entire thread to see if they have all been answered, but just enough to get a gist of what's going on.

 

Create an X marker with any kind of Reference ID (say, PlayerReturn for sake of the example)

 

In your script, BEFORE you teleport the player, toss in the line PlayerReturn.MoveTo Player

 

This will drop an X marker at the player's location (again, before you teleport the player, since scripts reads from top to bottom when processing) and once you want to teleport the player back, you simply use Player.MoveTo PlayerReturn and voila, instant teleportation and recall! Works great if you're making a teleportation spell too, though I can't remember if it places the X marker at the players feet or head... something to look into. If it places it at the head, let me know and I'll try to dig up how to offset a moveto command so it'll be placed on the ground.

 

Edit: And where possible, if it's a static location you wish to move the player to, I find it easiest to use X markers or X Heading Markers (Heading will make the player/npc face in the direction of the arrow, where as a normal X will keep the cardinal direction the player was facing) rather than a GetPos command. Even if you use a /lot/ of mark/recall deals, a single Marker used for the recall (PlayerReturn) can be used over and over again before you teleport the player to wherever you wish them to go.

Edited by Khet
Link to comment
Share on other sites

Thank you so much! I didn't realize it was so easy like that. I saw on the CS Wiki about using the return function, but had NO idea how to use it. I will try this and post back if I have to.

 

Thanks!

Link to comment
Share on other sites

Seem to have an issue with my NPC. I can't get him to stop conversation with my PC. Anything I can do to stop it after he speaks the needed lines? I think that is part of my issue in getting the rest of the commands to work.
Link to comment
Share on other sites

Sorry about that. I have the script set that when the PC has a certain stage and in a certain cell, startconversation. And in my "topic" it only says once and initiates Goodbye. But even after the goodbye, the NPC tries to initiate conversation again. I'd like for him to only say it once, so my PC can teleport out, but I think that is part of the problem that is not allowing my PC to leave the area. I've tried to disable the NPC, tried remove, whatever, but it just tells me that it doesn't recognize my refID. But it's clearly a normal ID. It's confusing me lol.

 

EDIT: Also, I cannot get the player recall to work in the way I want it to. If I can't figure it out, I have a workaround. The problem was, I had a Marker used for recall. But when playtesting this, the recall marker would appear NOT at the player's location, but at a weird location in my new worldspace. Maybe this is an issue with creating worldspaces?

 

If I have to, my workaround is that I make the PC sleep in ONE specific area, and it DOES work there. Like, make the player sleep in the bed in the inn where it all begins. I wanted the PC to be able to sleep anywhere and complete this, but it seems to be glitching.

Edited by Mehra
Link to comment
Share on other sites

Well, there's a difference of course between the editor ID and the Ref, but if the script is generally working, it should be okay. What conditions are determining when the conversation begins? Do they all change after the conversation is initiated?

 

(I have NO idea how to make recalls work-- never so much as tried it before, so I can't be of any help with that.)

Link to comment
Share on other sites

Scriptname AAUnknownDreamtalk

 

Begin Gamemode

 

if (getstagedone AACaiusQuest5 10 == 1) && (player.getinworldspace AADagothUrIntroWorld == 1)

StartConversation player

 

endif

 

end

 

 

Is the script. (afk for a few minutes)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...