Turning a page in a book.

InfectedBehaviour
Is there away to type: turn page. So when the player is carrying a book and has opened the book, They can turn the page or go to the next page. This would also suggest for the player to type: turn back a page, to go to a previous page.

XanMag
I've got a solution in mind but it is probably VERY messy. How many pages in a book are we talking about?

InfectedBehaviour
Fourteen pages.

I was going to allow the player when they open the book and look at it, the pages reveal themselves and then the player clicks on the page they would like to look at. Though I was just wondering if what I mentioned before could be done and how.

adammadam
well I know how you could do it but it's probably a really stupid way to do it as well in terms of being overly complicated.. but you could make 14 objects (page 1 -14). Give them all the name "page" under other names. Make another room, which is not visible, to put pages 2-14, just call it "page storage" or something, but keep page 1 in the book object (have the book set as a container). Then make a verb "turn". Then on page one add the verb "turn" to it and have it say whatever you want in the message (e.g. the contents of page 2), then also have "move object".. move page 1 to the "page storage" hidden room and move page 2 into the book object.

HegemonKhan
Pixie made a 'journal' Library, though I've never tried it, so I don't know if it has 'page flipping' or not:

viewtopic.php?f=18&t=2610 (Pixie's Journal Library)

and there is this too (has arrow button hyperlinks using a Command, which could be implemented for your 'page flipping' ), by Pixie and Jay, but it's quite advanced:

viewtopic.php?f=18&t=4057 (Level Up Library by Pixie and Jay)

------

here's a trick for increasing a count, an example (not related to 'page flipping' but you can certainly use this trick differently to do your 'page fliping'. So this example is just to show you a 'proof of concept' of what you can do via this trick):

<object name="player">
<attr name="strength" type=int">5</attr>
<attr name="endurance" type=int">10</attr>
<attr name="dexterity" type=int">15</attr>
<attr name="agility" type=int">20</attr>
<attr name="speed" type=int">25</attr>
<attr name="luck" type=int">30</attr>
</object>

<function name=xxx_function">
x=0
foreach (attribute_variable, split ("strength;endurance;dexterity;agility;speed;luck", ";")) {
x= x + 1
msg (x +". " + attribute_variable + ": " + player.attribute_variable)
}
</function>

// outputs:

1. strength: 5
2. endurance: 10
3. dexterity: 15
4. agility: 20
5. speed: 25
6. luck: 30

adammadam
yeah that seems like it will be an easier way than what I suggested, you can give the book an attribute "page number", integer, set to 1. Then give the book the name "page" under other names.. then when you type in "turn page" have it set the books attribute to "page number + 1" then "if attribute equals (if book.page number = 1) print message.. if 2 print message etc..

InfectedBehaviour
Thanks, I'll try it out.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums