Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass the child to the ATL scope #4405

Open
Tracked by #5102
Gouvernathor opened this issue Feb 28, 2023 · 0 comments
Open
Tracked by #5102

Pass the child to the ATL scope #4405

Gouvernathor opened this issue Feb 28, 2023 · 0 comments
Assignees
Labels
enhancement A proposed or requested enhancement or improvement to renpy's features.

Comments

@Gouvernathor
Copy link
Member

transform lucy_jump_scare(child):
    child      # Show the original child.
    pause 5
    "lucy mad" # Jump scare.
    pause .2
    child      # Go back to the original child.

This is taken from the doc, about the special child parameter. However, there's no way of doing that cleanly in the show-with-atl statement:

v "But..."
show eileen vhappy:
    2.
    "eileen screamer"
    .1
    "eileen vhappy"
e "Hmm..."
show eileen sad

In this example, if the player clicks too fast, the change to sad is overwritten by the ATL to screamer then to vhappy.
What I propose is this:

show eileen vhappy:
    2.
    "eileen screamer"
    .1
    child

The child variable inside the ATL scope gets set to its child.
The possible interfering with the child parts of #4371 will need to be clarified, but in my view it should be done with a context.context.setdefault("child", child), so that this behavior kicks in only in cases when it would have raised an exception.

@Gouvernathor Gouvernathor added the enhancement A proposed or requested enhancement or improvement to renpy's features. label Feb 28, 2023
@Gouvernathor Gouvernathor self-assigned this Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A proposed or requested enhancement or improvement to renpy's features.
Projects
None yet
Development

No branches or pull requests

1 participant