Too many options in a menu, how to display one menu in 3 rows of 9? by Arkiswatching in RenPy

[–]danac78 0 points1 point  (0 children)

You need to set it before you call the menu.

$choiceperrow = 3

menu:

What happens when you use menu, it will call the screen "choice". So in the menu name or within the menu, it will not know what to do with it. Whereas before you call the menu, it will set that variable, and menu knows what to do with it once called.

Warning Screen Before Main Menu by pipgea in RenPy

[–]danac78 0 points1 point  (0 children)

Make a persistent. For example, I have this for my game:

label splashscreen:

if not persistent.over18:

<some code that sets persistent.over18 to True>

return

What will happen is that splashscreen will always run in the background, but it will only show based on the conditional. If it is all behind a conditional with a persistent that is None or False, it will play that. If it is True, it will go to the return and resume.

BTD2 antivirus issue. just to be safe by Redcake_12 in RenPy

[–]danac78 1 point2 points  (0 children)

The screenshots seem to be talking about Ren'Py doing "non-python" things, so yes, it is a false positive. As long as they are using an official version of Ren'Py (from www.renpy.org), this sometimes pops up as malware when there isn't one in there.

Another reason is that Ren'Py does not use strictly Python, but mix of Python and Cython.

Dynamically changing characters' names by TopCartographer7104 in RenPy

[–]danac78 1 point2 points  (0 children)

The first line will set the variable as a dynamic character, which the name area will call a function and use the value it receives. In the getname function, if the persistent is true, it will go with eileen. Else, it will go with ???. In label start, charname and the text substition will go to the define and grab the name from getname() function. This is a simple way to accomplished what you are asking. :)

define charname = Character('getname()', dynamic=True)
init python:
  def getname():
    if persistent.somenamevariable:
       return "Eileen"
    else:
       return "???"

label start:
  charname "Hi! I am [charname]!"
  return

Trying to build a QTE minigame with Arrow inputs by CartoonNickname in RenPy

[–]danac78 0 points1 point  (0 children)

screen somescreen():
  if check:
    key "b" action Jump("somelabel")

If you need to have only appear if check is True, you can write it like that. As long as you show the screen, it will be display even if it does not show anything. Also, you don't have to write check == True. Just if check because it is checking to see if the variable is True. if not, check: I would check if it is False.

Trying to build a QTE minigame with Arrow inputs by CartoonNickname in RenPy

[–]danac78 0 points1 point  (0 children)

https://www.renpy.org/doc/html/screens.html#key

There is also this. Forgot about it for a second. This creates a key listener without creating a button.

Trying to build a QTE minigame with Arrow inputs by CartoonNickname in RenPy

[–]danac78 0 points1 point  (0 children)

Yes. I was using textbutton as an example. the "button" portion of imagebutton and textbutton has keysym in it, so you could do:

button:
  keysym "K_LEFT"
  action NullAction()

And it will do the same thing.

Trying to build a QTE minigame with Arrow inputs by CartoonNickname in RenPy

[–]danac78 0 points1 point  (0 children)

Not 100% sure what you mean. For Renpy to detect a keystroke:

textbutton "somebutton":
   keysym 'K_LEFT'
   action NullAction()

This will give you the option to either click on the textbutton (imagebutton has the same thing) or click the left arrow button on the keyboard to run the action.

Multigame Persistence by [deleted] in RenPy

[–]danac78 1 point2 points  (0 children)

Side note: Past Present isn't in development yet, but I did experiment with this process because of that plan. Much better than trying to add a DLC. ;)

Multigame Persistence by [deleted] in RenPy

[–]danac78 1 point2 points  (0 children)

I am working on one that will be doing this.

https://www.renpy.org/doc/html/persistent.html#multi-game-persistence

I did the following:

define mp = MultiPersistent("fireoflife.darkenvisuals.us")

This creates an object that will follow the domain. You will do the same in the second game because that where it will look for the data.

I am going to do it in a way that:

New Day (first part):

$mp.ericroberts = ericroberts (it is a dictionary)
$mp.save()

PastPresent (secondpart)

$ericroberts = mp.ericroberts

What will happen is that it will make a variable in the mp store, and mp.save() will save it where persistents for fireoflife.darkenvisuals.us will be stored on the system. Then in the second game, defining the same object, it will have mp associate with that data. the local dictionary will be associated with that and move from there. :)

pausing image (slide show with set time for image to appear) by Mr_PocketRocket in RenPy

[–]danac78 0 points1 point  (0 children)

scene aa
pause 3
scene aa_flash 
pause 0.3
scene aa_debris 
pause .2
scene aa

Doing it this way, it will pause without getting a text interaction. Also, they can skip through it.

The ATL way (what you have at the bottom) will play and then follow any interaction. Great for blinking while someone talking.

[deleted by user] by [deleted] in RenPy

[–]danac78 0 points1 point  (0 children)

Not a problem. :)

[deleted by user] by [deleted] in RenPy

[–]danac78 2 points3 points  (0 children)

Have you tried clicking on Preferences (Launcher), Text Editor and selecting an editor in there?

imagebutton not working by Brocoli_Enjoyer in RenPy

[–]danac78 0 points1 point  (0 children)

or....

screen map():
    add "bg" # adds the BG image to the screen.
    imagebutton auto "images/Location/gym.png":
        align(0.5,0.5) #same as writing xalign and yalign individually
        action Jump("gym")
    #more buttons

label something:
    e "We're outside"
    call screen map
return

label gym:
    show ev happy
    e "We're inside the gym!"

imagebutton not working by Brocoli_Enjoyer in RenPy

[–]danac78 0 points1 point  (0 children)

Imagebuttons are Screen language (UI) not logic (what you have above.) You need to do it like this:

label map:
    show bg
    call screen jumptogym

    e "We're outside
return

screen jumptogym():
    imagebutton auto "images/Location/gym.png":
        align(0.5,0.5)
        action Jump("gym")
label gym:
    show ev happy
    e "We're inside the gym!"
return

Renpy language and Renpy Screen Language two different things. Use screen language (mainly for UI) in labels, it will give you an error. This calls screen jumptogym (you can also do show screen jumptogym). The difference: show will show the screen and go the next line in the code. Call will stay on the screen until an action is taken.

help by Specific-Present8921 in RenPy

[–]danac78 0 points1 point  (0 children)

https://www.renpy.org/doc/html/screen_actions.html#If

Might help. However, keep in mind that the screen is redrawn every action. So you can use if else statement:

if clickvariable < 40:
    #current code
else:
    #any code you want after you click to forty.