Lemma Soft Forums

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


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Fri May 24, 2013 8:21 pm

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Jun 30, 2012 6:19 am 
Newbie

Joined: Sat Jun 26, 2010 11:41 am
Posts: 6
Hi everyone :)

I would like to include a very simply points system in my game, but I just can't seem to figure it out... :?

Here is my code:

At the beginning of the game

Code:
# The game starts here.
label start:
    $ Jane_love_point = 0
    $ Jess_love_point = 0
    $ Jem_love_point = 0
   
    scene bg door
    with Dissolve(.5)


Where the love point comes in

Code:
        Jane "Wooh... what have you got in that bag boy, it weighs a ton!"
       
        T "Just all of my stuff... Well at least you known I don't have it stuffed full of Blow-up Dolls"
       
        $ Jane_love_point += 1
       
        show Jane
       
        "Janes smiles at Tom again"


Where I want that love point to have an affect

Code:
    if Jane_love_point +1:
       
         Jane "Ye... He is seems like a nice lad."
       
         Jess "Ye ye... but is he NICE NICE???"
   
    else:
       
        Jane "Well he seems ok I geuss..."
       
        Jess "Just OK???..."


Any help would be great thanks guys.

Cheers


Top
 Profile Send private message  
 
PostPosted: Sat Jun 30, 2012 6:31 am 
Regular
User avatar

Joined: Thu Apr 16, 2009 9:18 am
Posts: 173
Completed: The Stolen Diamond Ring
Projects: Happy Memories: Azalea Town, Princess Battles
It's this part:
Code:
    if Jane_love_point +1

It should be:
Code:
    if Jane_love_point >= 1

_________________
Otome Games
Image


Top
 Profile Send private message  
 
PostPosted: Sat Jun 30, 2012 7:24 am 
Newbie

Joined: Sat Jun 26, 2010 11:41 am
Posts: 6
YES that works!!! thanks, :D

How would I do a range, say form 5 love points to 10 at activate a menu???


Top
 Profile Send private message  
 
PostPosted: Sat Jun 30, 2012 8:04 am 
Regular
User avatar

Joined: Thu Apr 16, 2009 9:18 am
Posts: 173
Completed: The Stolen Diamond Ring
Projects: Happy Memories: Azalea Town, Princess Battles
Something like:
Code:
if Jane_love_point >= 5 and Jane_love_point <= 10


I'm not entirely sure what you mean by the menu activation part? Adding an choice to the menu that only appears if the points are between 5 and 10?

_________________
Otome Games
Image


Top
 Profile Send private message  
 
PostPosted: Sat Jun 30, 2012 11:11 am 
Newbie

Joined: Sat Jun 26, 2010 11:41 am
Posts: 6
rinrin wrote:
Something like:
Code:
if Jane_love_point >= 5 and Jane_love_point <= 10



Thanks again :)

Just to check we are on the right lines, if a player got 8 love points, would that activate that bit of code you gave?

rinrin wrote:
I'm not entirely sure what you mean by the menu activation part? Adding an choice to the menu that only appears if the points are between 5 and 10?


I just mean really to turn on certain bits of text or other menus using the 'if' and 'else' code within the love points the player may have earn so far.


Top
 Profile Send private message  
 
PostPosted: Sat Jun 30, 2012 11:23 am 
Regular
User avatar

Joined: Thu Apr 16, 2009 9:18 am
Posts: 173
Completed: The Stolen Diamond Ring
Projects: Happy Memories: Azalea Town, Princess Battles
DaveC64 wrote:
Just to check we are on the right lines, if a player got 8 love points, would that activate that bit of code you gave?

Yes, that should work.

_________________
Otome Games
Image


Top
 Profile Send private message  
 
PostPosted: Sat Jun 30, 2012 5:24 pm 
Newbie

Joined: Sat Jun 26, 2010 11:41 am
Posts: 6
Thanks for all your help Rinrin :)


Top
 Profile Send private message  
 
PostPosted: Sun Jul 01, 2012 12:26 am 
Regular
User avatar

Joined: Thu Apr 16, 2009 9:18 am
Posts: 173
Completed: The Stolen Diamond Ring
Projects: Happy Memories: Azalea Town, Princess Battles
You're welcome :)

_________________
Otome Games
Image


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], pwisaguacate


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