Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.

Visit our new games list, blog aggregator, and IRC channel.
Activation problem? Email pytom@bishoujo.us.
It is currently Tue Feb 21, 2017 3:31 am

All times are UTC - 5 hours [ DST ]


Forum rules


Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.



Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
PostPosted: Fri Feb 10, 2017 5:38 pm 
Newbie
User avatar

Joined: Fri Feb 10, 2017 11:56 am
Posts: 2
Twitter: @karuni17
Tumblr: mostlikelytomorrow
Deviantart: karuni17
Thanks for the nice dating sim engine.
I was just wondering how to limit the number of days you have to reach a certain goal? :)


Top
 Profile Send private message  
 
PostPosted: Mon Feb 13, 2017 2:09 pm 
Veteran
User avatar

Joined: Thu Jul 31, 2003 10:06 pm
Posts: 402
Location: New Mexico, USA
Organization: Metasepia Games
Twitter: @Andrea_Landaker
Deviantart: qirien
Github: qirien
Well, you could easily put a check in to see what day it is, and jump to an end sequence at that point.

For example, in the sample code's main.rpy, when you increment the day, you could add something like this (set MAX_DAYS to however many days you want to run):
Code:
    if (day >= MAX_DAYS):
        jump ending

and later have:
Code:
label ending:
    if ((strength >= 100) and (intelligence >= 100)):
        jump superhero_ending
    elif (strength >= 100):
        jump strong_ending
    elif (intelligence >= 100):
        jump smart_ending
    else:
        jump slacker_ending


Does that make sense?

_________________
Finished games:

Image
Image
Image


Top
 Profile Send private message  
 
PostPosted: Wed Feb 15, 2017 1:14 pm 
Newbie
User avatar

Joined: Fri Feb 10, 2017 11:56 am
Posts: 2
Twitter: @karuni17
Tumblr: mostlikelytomorrow
Deviantart: karuni17
Yeah, I'll try that. Thank you so much for your help. :)


Top
 Profile Send private message  
 
PostPosted: Thu Feb 16, 2017 10:21 pm 
Newbie
User avatar

Joined: Sun Jan 08, 2017 8:03 pm
Posts: 2
Completed: Gulungan Pengembara & Puteri
Projects: Sim VN Setia
Hi, ... i'd try it, but i have problem when i use event.choose_one and event.solo together, is they can't work together? coz if i use event solo, the event.choose_one not working. Any solution?

Code:
    $ event("sekolah1", "act =='01class'", event.choose_one('01class'), event.solo(), priority=200)
    $ event("sekolah2", "act =='01class'", event.choose_one('01class'), event.solo(), priority=200)


the event.choose_one just call first label only.


Top
 Profile Send private message  
 
PostPosted: Fri Feb 17, 2017 1:41 pm 
Veteran
User avatar

Joined: Thu Jul 31, 2003 10:06 pm
Posts: 402
Location: New Mexico, USA
Organization: Metasepia Games
Twitter: @Andrea_Landaker
Deviantart: qirien
Github: qirien
Yes, solo is meant for a single event, so you can't really use it with choose_one. Instead, you could change the priority on the events. The system will prefer events with a lower priority number, so if you have other events you want it to pick and only use these if none of those match, set those events to have a lower priority value.

Would that work for what you want to do?

_________________
Finished games:

Image
Image
Image


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Clef


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group