Jump to content

Scripting Question


bencebence

Recommended Posts

Hmm, now it almost works. (I think one of the problems was that I didn't remove the other script from the NPC :rolleyes: .The script still don't wakes me up, but when I made it so I get up at seven o'clock, the servant shows up, but talks to lots of time, this can be fixed by a DoOnce) So here is he script little bit fixed.

scn WakeUpPlayerQuestScript

float time
short aweken
short DoOnce

begin MenuMode
       set time to GameHour
       if player.getincell aaaLillyhallCastlePrivateQuarters
               if time >= 7 && time <= 8
                       set aweken to 1
			WakeUpPC
               endif
       endif
end
Begin GameMode
       if aweken == 1
               bedroomservant01.moveto player
                       if DoOnce == 0
                               bedroomservant01.StartConversation player, WakeUpSir
                       endif
               set Aweken to 0
       endif
end

 

EDIT: Also I have one more question:

I placed a script on a furniture. Now I can only use it as an activator, and can't sit in it...

EDIT2: I think if I make a quest script, it'll solve everything.

Edited by bencebence
Link to comment
Share on other sites

If you tied an OnActivate script to a chair, then you need to use the "Activate" command to make you sit in it like normal. This may require a separate set of conditions to make sure the script isn't set off whenever you sit in it. Also NPCs can activate the chair and it's script as well under certain circumstances, so include/exclude them if it is an issue.
Link to comment
Share on other sites

As long as it's just StartConversation that needs to be in Gamemode and not MoveTo as well, then you might be able to simplify things by adding a 'find' package to the NPC. If an NPC is told to find another NPC, including the player, they will start a conversation with them when they do find them. So your script could be:

[script]scn YourQuestScript

 

Float fQuestDelayTime

 

Begin Menumode

 

Set fQuestDelayTime to 0.5

 

If player.GetInCell YourCell

Else

Return

Endif

 

If gamehour < 7 || gamehour > 8

Return

Endif

 

YourNPC.MoveTo player

YourNPC.AddScriptPackage FindPlayer

WakeUpPC

 

End[/script]

There may already be a FindPlayer package, if not, you'll have to make one.

Link to comment
Share on other sites

If you tied an OnActivate script to a chair, then you need to use the "Activate" command to make you sit in it like normal. This may require a separate set of conditions to make sure the script isn't set off whenever you sit in it. Also NPCs can activate the chair and it's script as well under certain circumstances, so include/exclude them if it is an issue.

There is only one problem with it. I have only one topic, that she should say. But if I just use Find, she'll just go to the player and say Hi.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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