Difference between revisions of "PassTime - Game"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Braydoge
(Documented the bug in this function)
imported>Qazaaq
m (Added wiki links and minor spelling corrections.)
 
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
'''Member of:''' [[Game Script]]
'''Member of:''' [[Game Script]]


'''Warning''': This function is not working as intended. Instead of passing the specified number ouf hours, this function always passes 100 in-game hours.
'''Warning''': This function is not working as intended. Instead of passing the specified number of hours, this function always passes 100 in-game hours.
The following documentation describes the intended functionality, not the actual behavior!
The following documentation describes the intended functionality, not the actual behavior!
Consider incrementing the "GameHour" global as a replacement.
Consider incrementing the "GameHour" [[Global]] as a replacement.




Passes the specified number of hours as if the player used the wait menu. This runs full updates of AI so if the number of hours is large enough, this can produce a noticeable hitch best hidden insed of a menu.
Passes the specified number of hours as if the [[Player]] used the [[SitWaitMenu]]. This runs full updates of AI so if the number of hours is large enough, this can produce a noticeable hitch best hidden behind a menu.


== Syntax ==
== Syntax ==
Line 24: Line 22:
<source lang="papyrus">
<source lang="papyrus">
;make player wait until midnight
;make player wait until midnight
int iwait = 24 - GameHour;
int iwait = 24 - GameHour
PassTime( iwait );
PassTime(iwait)
</source>
</source>


== See Also ==
== See Also ==
*[[Game Script]]
*[[Game Script]]
[[Category:Scripting]]
[[Category:Papyrus]]

Latest revision as of 09:00, 11 July 2021

Member of: Game Script

Warning: This function is not working as intended. Instead of passing the specified number of hours, this function always passes 100 in-game hours. The following documentation describes the intended functionality, not the actual behavior! Consider incrementing the "GameHour" Global as a replacement.


Passes the specified number of hours as if the Player used the SitWaitMenu. This runs full updates of AI so if the number of hours is large enough, this can produce a noticeable hitch best hidden behind a menu.

Syntax[edit | edit source]

Function PassTime(int aiHours) native global

Parameters[edit | edit source]

  • aiHours: The number of hours to pass

Return Value[edit | edit source]

None

Examples[edit | edit source]

;make player wait until midnight
int iwait = 24 - GameHour
PassTime(iwait)

See Also[edit | edit source]