![]() You can put whatever other properties you want in there, I just used "relationship", "HP", and "MP" as an example. So, in your StoryInit passage, you'll want to initialize any properties for your NPCs something like this: /* This is a static list of all NPCs' names, and this list must NOT change during the course of the game. To keep things simple, it might be best to organize your data on an object variable which tracks all NPCs. When you have options for certain choices in your game, if it increases and/or decreases the relationship with various characters, you can raise or lower a value which represents that relationship with that NPC. That said, here's a few example of ways you could do what you're looking for. Which method(s) are best for you, all depend on how the mechanics in your game work. For example from the Sugarcube documentation: > I love you! Keep in mind it's possible to nest if statements inside of if statements if you want to evaluate multiple variables and can create some pretty complex programming, and you can also use > instead of else to create chains of different text based on the reputation. Something like > Hello again, friend! > I barely even know you. Keep in mind that you can also update variables using passage links, like ] or with the use of the > command which will update the variable when clicked but not force the user to go to the next passage.įinally, you can create custom text and links through the use of if statements. You can display the contents of the variable by just typing $NPC1Relationship. Anything in that passage will be displayed on the sidebar. To show your relationships with NPC's on the sidebar, you need to have a passage named Stor圜aption. Create a variable with the SET command, something like > and later in your passages you can increase or decrease it by doing something like > to increase it by 5. Variables are stored bits of information that you're able to change throughout the story, i.e., in your case, you can have a variable created for the relationship with each character you come across. To create what you're trying to do, you'll want to work with variables. Section 4 deals with Variables and Programming. Likewise, check out A Total Beginners Guide to Twine. Bookmark this link as you'll want to refer to it often. First off, SugarCube has extensive documentation. This is actually a pretty straightforward thing to do.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |