Search found 337 matches

by henvu50
Mon Nov 05, 2018 7:37 am
Forum: Ren'Py Questions and Announcements
Topic: How do I output the value of a variable to the console for debugging purposes?
Replies: 2
Views: 302

How do I output the value of a variable to the console for debugging purposes?

How do I output the value of a variable to the console for debugging purposes?

Code: Select all


label Start:

   $ helloTest = "test"

   # output content of variable to console window (shift O)  ??
   print helloTest

by henvu50
Mon Nov 05, 2018 7:22 am
Forum: Ren'Py Questions and Announcements
Topic: Why does my custom function only return the name of the function?
Replies: 3
Views: 275

Why does my custom function only return the name of the function?

I have a problem. My custom function only returns the name of the function: <function testFunc at 0x08390938> It doesn't return the actual string of "wtf". screen testScreen: vbox: $ globalVariable = testFunc(87) textButton "[globalVariable]": action Return(1) init python: def te...
by henvu50
Mon Nov 05, 2018 6:53 am
Forum: Ren'Py Questions and Announcements
Topic: How to use a label like a function?
Replies: 4
Views: 431

How to use a label like a function?

I'm trying to make a function, but I get an error: "testFunction is not defined" label testFunction(val): if val = "one": return("hello") else: return("okay") screen test: vbox: # should get set to a value of string "okay" $ globalVariable = testFunc...
by henvu50
Mon Nov 05, 2018 4:04 am
Forum: Ren'Py Questions and Announcements
Topic: How do I use & declare variables without the $ symbol?
Replies: 17
Views: 1784

How do I use & declare variables without the $ symbol?

I still haven't figured out how to use variables without using $ constantly. Let's say I want to declare & use a variable only within a function, how would I do that? label genericFunction: declare variableOnlyUsedInThisFunction = "hello world" text variableOnlyUsedInThisFunction How d...
by henvu50
Mon Nov 05, 2018 3:32 am
Forum: Ren'Py Questions and Announcements
Topic: How do I assign a custom text align to two textbuttons in an hbox?
Replies: 0
Views: 150

How do I assign a custom text align to two textbuttons in an hbox?

Here is what I'm trying to achieve: https://i.imgur.com/4ZLtM50.jpg I want to right align the words name & address, but left align the actual name & address. Here is my code so far: vbox: hbox: textbutton "name:": text_align 1.0 xalign 1.0 action Return(1) textbutton " harold ...
by henvu50
Tue Oct 23, 2018 7:37 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I show & hide text within a screen using an action?
Replies: 2
Views: 875

How do I show & hide text within a screen using an action?

Code: Select all

screen testWindow:
   text "Text 1"
   text "Text 2"
   
   imagebutton:
      idle "images/button5.png"
      #onclick
      # hide TEXT 2
   
When the image button is clicked, how do I hide "Text 2" using action?
by henvu50
Thu Sep 13, 2018 6:24 pm
Forum: Ren'Py Questions and Announcements
Topic: How to align text to the right in a vbox?
Replies: 2
Views: 2024

Re: How to align text to the right in a vbox?

n/m, here is solution: vbox: xpos 100 ypos 100 # how do I right align the following text in the picture? text "Joe:" xalign 1.0 text "Bob:" xalign 1.0 text "Kathy:" xalign 1.0 text "Kate:" xalign 1.0 text "Larry:" xalign 1.0 Is there a better way to ...
by henvu50
Thu Sep 13, 2018 6:20 pm
Forum: Ren'Py Questions and Announcements
Topic: How to align text to the right in a vbox?
Replies: 2
Views: 2024

How to align text to the right in a vbox?

How do I right align text like this in a vbox? https://i.imgur.com/FDx6ynw.jpg vbox: xpos 100 ypos 100 # how do I right align the following text in the picture? text "Joe:" text "Bob:" text "Kathy:" text "Kate:" text "Larry:"
by henvu50
Thu Sep 13, 2018 5:52 pm
Forum: Ren'Py Questions and Announcements
Topic: How to skip straight to a section of code for faster debugging?
Replies: 3
Views: 1658

How to skip straight to a section of code for faster debugging?

Please recommend some tips for skipping straight to a section of code for faster debugging purposes? Any tips and tricks? Currently I start up my renpy project from beginning, click start, go to the section in the game that needs testing, but is there a better way?
by henvu50
Wed Sep 12, 2018 10:06 pm
Forum: Ren'Py Questions and Announcements
Topic: How to create drop shadow style for text?
Replies: 1
Views: 4996

How to create drop shadow style for text?

How do I create a drop shadow style for text? The documentation speaks of this functionality, but doesn't provide an example.

Code: Select all

style testStyle:

    size 20
    underline True
    color "#747708"
    # add drop shadow effect here
by henvu50
Tue Sep 11, 2018 11:39 pm
Forum: Ren'Py Questions and Announcements
Topic: Prevent imagebutton action from advancing dialogue?
Replies: 1
Views: 344

Re: Prevent imagebutton action from advancing dialogue?

I figured it out. if your function label has return in it, it will advance the dialogue. I used this code instead of the above function call: imagebutton: idle "images/arrow_id.png" hover "images/arrow_hov.png.png" action [SetVariable("variableTest", variableTest + 1)] ...
by henvu50
Tue Sep 11, 2018 11:18 pm
Forum: Ren'Py Questions and Announcements
Topic: Prevent imagebutton action from advancing dialogue?
Replies: 1
Views: 344

Prevent imagebutton action from advancing dialogue?

imagebutton: idle "images/arrow_id.png" hover "images/arrow_hov.png.png" action Function(renpy.call, label="doSomethingWithVariable") How do I prevent the action Function call from advancing the story dialogue text? I tried using modal set to true, but the imagebutton ...
by henvu50
Sat Sep 08, 2018 5:35 pm
Forum: Ren'Py Questions and Announcements
Topic: Make horizontal bar with left & right arrow buttons that scroll a hbox? (picture)
Replies: 1
Views: 433

Make horizontal bar with left & right arrow buttons that scroll a hbox? (picture)

I made a picture of what I'm trying to achieve: https://i.imgur.com/10BScOQ.jpg There's an hbox with name labels in it. Then you click the left and right arrows, it cycles through the names while showing data of each name in the center. Does anyone know an example somewhere out there already made th...
by henvu50
Thu Sep 06, 2018 12:19 pm
Forum: Ren'Py Questions and Announcements
Topic: How to return the index of an array in a for loop?
Replies: 5
Views: 1388

Re: How to return the index of an array in a for loop?

Thanks, I changed my code accordingly. Is it safe to use $ in a vbox for a loop? Doesn't $ make the variable global? If I use $ index somewhere else couldn't it conflict? vbox: $ index = 10 for item in reversed(arrayTest): text "[index]" $ index -= 1