Jump to content

Scripting Question


bencebence

Recommended Posts

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 by bencebence
Link to comment
Share on other sites

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

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

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

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
end

Still no work... :S (made a quest too)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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