Jump to content

Script: Sleep, Enter Zone, Conversation


Mehra

Recommended Posts

This is not true. In fact, if all you are concerned about is that 'X != 0', then simply using 'if X', and avoiding the comparative entirely, is also preferable from an efficency point of view; as non-comparitive 'if's are faster to process as well.

Ooh, okay-- I obviously hadn't taken that into account; I'm still learning, myself-- and this gets added into my "things to remember" file.

 

I think my game just hates me.

It doesn't hate you-- it just believes in tough love! :thumbsup:

Link to comment
Share on other sites

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

It doesn't hate you-- it just believes in tough love! :thumbsup:

 

 

Ugh, it worked twice in a row and then is now refusing to work. Crash on sleep, or doesn't register the script at all. What the crap?

 

After trying five times, now the game is crashing on startup...

 

Yup, my game and my really terrible excuse for a OS is what I want to blame, although I'm sure there's more at play.

Edited by Mehra
Link to comment
Share on other sites

Keep calm. If you smoke, now is the time to do so.

 

Bug hunting is like this. It could be something as seemingly insignifficant as an extra space on a single line. As I said, start systematically commenting out chunks of your code until the crashing stops. Then go to the last block you commented out, and try reactivating it, bit by bit, until you find the exact line that is causing the crash.

Link to comment
Share on other sites

Oh I'm fine lol. Although I'm a bit fuming, I'm chill. I just hate bug squashing lol. Yargh... bugs.

 

Oh, I also remembered, I tried to do that commenting thing you said to do, and when I did that, the game wouldn't recognize the script. Hrm... going back to try it again.

Link to comment
Share on other sites

I'm going to sound dumb, but I really don't understand what you just said.

 

What exactly am I taking out? And where do these ";" go? Like ;Wakeuppc or ; wakeuppc? Or am I wrong? (it's alright if I am)

 

when I did that, the game wouldn't recognize the script.

You have to leave certain essential parts of it. So leave the 'scn xxx', the variable declarations, and the 'Begin...End' lines, and take out the rest.

 

EDIT: Weird... I put the End Menumode back in and now it works. :\

 

Guess I'm back to finding a way to stop conversation, unless all I can do is just have the PC teleported out after the initial conversation.

Edited by Mehra
Link to comment
Share on other sites

Gotcha. I thought as much. Although, I got it to work again. Hopefully, it doesn't trip out again, lest I have to comment the script.

 

I don't see a function on the wiki to end conversation, do I need to do some intricate code to work around the constant start conversation?

 

Something like, after the conversation/quest update, follow with a teleport out? And concerning the teleport out, how do I get the PC to return to their original position? I'll go check out the teleport recall page while I browse this thread. Also, still have that disableplayercontrol issue. Where in my code should that be?

 

 

Very much thanks so far.

Edited by Mehra
Link to comment
Share on other sites

As I said before. Your NPC's script will cause them to start a conversation with the player when the two conditions presented are true. As the stage 10 for your quest is still 'done' and the player is still in your worldspace, they are still both true.

 

You should be able to do away with the spell, and its SetStage function entirely. Just have declare 'Short StartConv' variable in your quest script, then replace the 'player.addspell...' line with 'set StartConv to 1'. Change the NPCs script to be 'if YourQuest.StartConv && player.Getin...', and then add the line 'set YourQuest.StartConv to 0' to the results script for your GREETING topic.

 

As for the 'Disableplayercontrols': Not a command I've actually used myself, but at a guess, if it didn't work when you put it in the Menumode block, then maybe the player's controls are already disabled during sleep, then re-enabled after, thus nullifying your command. If so, then you could try putting it in the NPC's script.

Link to comment
Share on other sites

Ok. Noted.

 

On another note, how can I get the player to teleport back to their original position? I'm reading the wiki, but it isn't making much sense to me.

Edited by Mehra
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...