Is this okay or do I have to change it?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
humanpencil
Newbie
Posts: 13
Joined: Mon Jun 03, 2019 3:42 am
Contact:

Is this okay or do I have to change it?

#1 Post by humanpencil »

Is this going to work?

Code: Select all

$ life_hp = 100:
    if life_hp = 0:
        "GAME OVER"
        return
I also want to do the same thing with gold coins but instead of the game ending I want it to say "insufficient amount of gold".
Can someone help me do those 2 things?

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Is this okay or do I have to change it?

#2 Post by rayminator »

here what it should look like

Code: Select all

$ life_hp = 100: - this will give you 100 hp 
$ life_hp -= 100: - this will minus your hp

    if life_hp >= 0 and life_hp <= 25:
        "You have 25 HP left"
        jump to_map
    elif life_hp == 0:
        "Game over"
        return

Post Reply

Who is online

Users browsing this forum: Exiscoming, simple_human