How to make the danganronpa truth bullet chamber?

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
bunko
Newbie
Posts: 1
Joined: Wed Nov 29, 2023 6:25 pm
Contact:

How to make the danganronpa truth bullet chamber?

#1 Post by bunko »

So far, I'm making good progress with my Danganronpa fangame, Mentality. Albeit, the class trial mechanics are giving me some trouble. I've gotten the nonstop debate flying statements solved, but how do I make the truth bullet chamber and rotate the bullets as desired without pausing the game?

Here's my code.

Code: Select all

transform arguecg1():
    alpha 1.0
    xpos 100
    ypos 150
    linear 6.0 xpos 500 

transform arguecg2():
    alpha 1.0
    xpos 500
    ypos 500
    linear 6.0 xpos 50

transform arguecg3():
    alpha 1.0
    xpos 300
    ypos 200
    linear 6.0 xpos 50 ypos 900

transform arguecg4():
    alpha 1.0
    xpos 0.1
    ypos 0.5
    linear 6.0 xpos 500 

define e = Character("Michiko Okane")

define a = Character("Aya Masaki")

define k = Character("Kenji Kimura")

define m = Character("Ayumi Takenaka")

define h = Character("Haruko Omura")

# The game starts here.

label start:

    # Show a background. This uses a placeholder by default, but you can
    # add a file (named either "bg room.png" or "bg room.jpg") to the
    # images directory to show it.

    scene bg room

    # This shows a character sprite. A placeholder is used, but you can
    # replace it by adding a file named "eileen happy.png" to the images
    # directory.

    show kyoko think

    # These display lines of dialogue.

    e "It's clear that someone was in the gym with Ichiro..."

    e "It's impossible that he was killed elsewhere."

    e "So think about it. Who else was in the gym?"

    call screen argument1

screen argument1():
    
    hbox:
        
        textbutton _("{color=#FFFFFF}Kazumi must have killed Ichiro!{/color}"):
            at arguecg1
            text_outlines [(2, "#000000", 0, 0)]
            text_font "Benjamin Bold.ttf"
            text_size 50

        timer 5.0 action Jump("argument2")

label argument2:

    call screen argument2

screen argument2():

    hbox:
        textbutton _("{color=#FFFFFF}Yeah, she was the{/color} {color=#F8C832}only other one{/color} {color=#FFFFFF}in the gym!{/color}"):
            action Jump ("nottheonlyoneingym") 
            at arguecg2 
            text_outlines [(2, "#000000", 0, 0)]
            text_font "Benjamin Bold.ttf"
            text_size 60

        timer 5.0 action Jump("argument3")

label argument3:

    call screen argument3

screen argument3():
    textbutton _("{color=#FFFFFF}When I found the body, {/color} {color=#F8C832}no one else was on the scene{/color} {color=#FFFFFF}with me.{/color}"):
            action Jump ("only_one_that_discovered") 
            at arguecg3 
            text_outlines [(2, "#000000", 0, 0)]
            text_font "Benjamin Bold.ttf"
            text_size 50

    timer 5.0 action Jump("argument4")

label argument4:

    call screen argument4

screen argument4():
    textbutton _("{color=#FFFFFF}Kazumi must have fled the scene...{/color}"):
            at arguecg4 
            text_outlines [(2, "#000000", 0, 0)]
            text_font "Benjamin Bold.ttf"
            text_size 50

    timer 5.0 action Jump("again")

label again:
    
    show kyoko think

    a "No, something doesn't seem right about that...."

    jump start

label nottheonlyoneingym:
    show kyoko think with hpunch

    a "No, that's wrong!"

    h "What? No, it's not!"

    a "Kazumi wasn't the only one in the gym. Because...."

    # This ends the game.

return

label only_one_that_discovered:
    show kyoko think with hpunch

    a "No, that's wrong!"

    m "What? Um... But I was the only one that found his body?"

    m "Kenji came in after me. He can back me up."

    k "She's right, Aya. No one was on the scene with her."

    show kyoko think2 with hpunch

    a "A-ah.... I should rethink that..."

    jump start

User avatar
m_from_space
Miko-Class Veteran
Posts: 889
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: How to make the danganronpa truth bullet chamber?

#2 Post by m_from_space »

bunko wrote: Wed Nov 29, 2023 6:43 pm So far, I'm making good progress with my Danganronpa fangame, Mentality. Albeit, the class trial mechanics are giving me some trouble. I've gotten the nonstop debate flying statements solved, but how do I make the truth bullet chamber and rotate the bullets as desired without pausing the game?
I think you should ask more general questions instead of referring to a specific game. Because not everybody (like me) knows what you mean and that decreases the chance that a person is going to help you out.

Chains
Newbie
Posts: 11
Joined: Mon Dec 13, 2021 4:01 pm

Re: How to make the danganronpa truth bullet chamber?

#3 Post by Chains »

I would create a screen called "truthbullets_case1" or something similiar. Show it before the first argument screen using "show screen" instead of "call screen". Then "truthbullets_case1" won't dissappear even if an argument screen has ended. You can make the bullets move with ATL just as you have done with the arguments. Maybe use imagebuttons instead of text and make a variable for each bullet to change their position. You could even use "truthbullets_case1_bullet1" to whichever number of truth bullets available and show the screen depending on which bullet is currently selected.

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]