bencebence Posted August 4, 2011 Share Posted August 4, 2011 (edited) Hey everyone!I made an npc, who should wake me up from 7 o'clock to 8 o'clock somewhere. Here is the script:scn aaaServant01WakeUpPlayer float time begin MenuMode set time to GameHour if player.getincell aaaLillyhallCastlePrivateQuarters if IsPCSleeping if time >= 7 && time <= 8 moveto player WakeUpPC StartConversation player, WakeUpSir endif endif endif end Can it be the problem that I didn't waypoint the castle, and neither the editor location of the npc?Thanks in advance,bencebence Edited August 4, 2011 by bencebence Link to comment Share on other sites More sharing options...
PrettyMurky Posted August 4, 2011 Share Posted August 4, 2011 You've put the code in a Gamemode block, so will not be running when the PC is asleep. You need to put it in a Menumode block. Link to comment Share on other sites More sharing options...
bencebence Posted August 4, 2011 Author Share Posted August 4, 2011 I've just tried it. It still don't work. Maybe the whole script is bad? (I've applied it on the npc)I wanted to make that around 7 o'clock, if the player is in the castle's private quarters, and is sleeping then the NPC moves to the player and starts a dialogue with the player.Is the script bad or is there any other problems with it? Link to comment Share on other sites More sharing options...
fg109 Posted August 4, 2011 Share Posted August 4, 2011 If the NPC hasn't been loaded, then the script wouldn't run. I'm not sure how long an NPC would stay loaded in memory, but did you try setting the NPC in the same cell as the player? Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted August 4, 2011 Share Posted August 4, 2011 The NPC can't "move" while the PC's sleeping. The game is technically "paused" during this time. However, "moveto" is a teleport, so that shouldn't be an issue here. Perhaps add some debug messages after each condition to see if any of them aren't matched? Maybe the NPC has no background processing enabled, that is his scripts won't execute when not in the player's cell. I think it's called "low processing" and can be disabled (must be enabled?) for certain actors. Ref: http://cs.elderscrolls.com/constwiki/index.php/Script_Processing Link to comment Share on other sites More sharing options...
bencebence Posted August 4, 2011 Author Share Posted August 4, 2011 It's enabled for her. But she isn't in the same room as the player. (At servant's quarters) So should I place her editor location into that room or what? Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted August 4, 2011 Share Posted August 4, 2011 Have you checked if the script is even executed at all already? If all conditions are met? If anything else fails and the script just will not be executed while she's not in the player's cell and/or the player's sleeping, how about giving her a persistent reference id and putting the script onto something else, changing all calls to make her do something by adding her ref id in front of them, maybe even a quest, which definitely "is" executing while the player's asleep? Link to comment Share on other sites More sharing options...
bencebence Posted August 4, 2011 Author Share Posted August 4, 2011 Thanks, I think I'll try that. Working with quests most of the times fix everyhing :D Link to comment Share on other sites More sharing options...
okokokok Posted August 4, 2011 Share Posted August 4, 2011 (edited) Noticed that GameHour Returns a short variable not a float. Been some time since i scripted but thought you might want to know. Edit: i have to learn to read. Edited August 4, 2011 by okokokok Link to comment Share on other sites More sharing options...
bencebence Posted August 4, 2011 Author Share Posted August 4, 2011 Modified the script like this:scn WakeUpPlayerQuestScript float time begin MenuMode set time to GameHour if player.getincell aaaLillyhallCastlePrivateQuarters if IsPCSleeping if time == 7 bedroomservant01.moveto player bedroomservant01.WAkeUpPC bedroomservant01.StartConversation player, WakeUpSir endif endif endif endStill no work... :S (made a quest too) Link to comment Share on other sites More sharing options...
Recommended Posts