I am not sure that I follow...
These are some examples from my project:
Code: Select all
$ renpy.show("_tag", what=Text("%d" % wage, style="back_serpent", color=gold, size=40, bold=True), at_list=[found_cash(150, 600, 2)])
Ren'Py statement would be:
Code: Select all
show expression Text("%d" % wage, style="back_serpent", color=gold, size=40, bold=True) at found_cash(150, 600, 2) as _tag
which I prolly should have used here.
Here is one deep within Python showing both, a Transform and an ATL Function with instructions:
Code: Select all
for index, target in enumerate(targets):
aimpos = battle.get_cp(target, type="center")
renpy.show("launch" + str(index), what=missle, at_list=[move_from_to_pos_with_easeout(start_pos=initpos, end_pos=aimpos, t=pause), Transform(anchor=(0.5, 0.5))], zorder=target.besk["zorder"]+50)
Code: Select all
python:
n = Character(" ")
img = get_random_event_image("simple_beach")
renpy.show("event", what=img, at_list=[center])
renpy.with_statement(dissolve)
And the function (
not safe for android, renpy.list_files should be used instead) (content path is just a func returning os path leading to game/content folder) (ProportionalScale is a class returning resized image no properly scaled to take the largest of two sides and scale the other one preserving the true image ratio):
Code: Select all
init -9 python:
def get_random_event_image(eventfolder):
templist = []
if eventfolder in os.listdir(content_path('events')):
for file in os.listdir(content_path('events/%s' % eventfolder)):
templist.append('content/events/%s/%s' % (eventfolder, file))
return ProportionalScale(choice(templist), config.screen_width, config.screen_height)