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.
I couldn't find an answer to this myself or in any of the places I looked, so I figured I'd ask here: Is there a way to have transforms defined differently based on which type of device a game is being played on? (Similar to how some screen language can be modified based on which device the game is on.)
Something I tried which may help show what I mean:
init -20:
transform left:
if not renpy.variant("small"): # normal devices
xalign 0.0
yalign 1.0
else: # mobile phones
xalign -0.25
yalign 1.0
Main Website
Includes information about and links to many of my current and past projects.
Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series
That seems to work for me, thanks! Luckily, I think I only need to change the position/alignment values based on the device type. I'm not really familiar with the syntax used, but at least it seems to work the way I needed it to.
Main Website
Includes information about and links to many of my current and past projects.
Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series
The way I do it is make different transforms, and then use the variant check, where tha transform is applied.
Also has its limits, but is another possible way to do it.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
That kind of syntax looks more familiar to me, so I might try that one. That's exactly the kind of thing I'm looking for, so thanks for the help!
Main Website
Includes information about and links to many of my current and past projects.
Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series