Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Time Display

$
0
0
Hi, so I want to implement an in game time system (I'm using Harlowe).

Basically I want certain actions (hanging out with people/exploring/etc) to take up time and there are only so many hours in a day before you rest and at certain days certain things happen. Now, I know how to make the day counter go: When you 'rest' the day counter goes up. It's also displayed when you're in the bedroom.

My problem seems to be the time. I want it to be in the header on the far right corner.

In my startup page, I have
(set: $days to 0)
(set: $turn to 0)

(if: $turn >= 8)[
	(set: $day to $day + 1)
	(set: $turn to 0)
	(print: "It's getting late so you decide to go home and get some rest.") (goto:Home)]

On a seperate page labeled time I have
(if: $turn is 1) [(set: $time to "Dawn")]
(if: $turn is 2) [(set: $time to "Early Morning")]
(if: $turn is 3) [(set: $time to "Morning")]
(if: $turn is 4) [(set: $time to "Afternoon")]
(if: $turn is 5) [(set: $time to "Evening")]
(if: $turn is 6) [(set: $time to "Evening")]
(if: $turn is 7) [(set: $time to "Sunset")]
(if: $turn is 8) [(set: $time to "Midnight")]

Before you comment, yes, I know 5&6 are evening but that's when most of the characters are supposed to be off work.

My problem is, this doesn't work.

My header is supposed to constantly display a link to inv/relationships/stats/etc and then the 'time'. I tried this as
(if: (passage:)'s name is "inventory")[<!--Do nothing-->]
(else-if: (passage:)'s tags contains "donotshowinventory")[<!--Do nothing-->]
(else:)[ [[Inventory|inventory]] [[Relationships]] [[Stats]] [[Tablet]] 	(print: $time)

]

Does anyone know what I'm doing wrong or how I can do this better?

Viewing all articles
Browse latest Browse all 1844

Trending Articles