(Solved) How to run "focus_down" from config.keymap as a Screen Action?

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.
Post Reply
Message
Author
User avatar
SypherZent
Veteran
Posts: 362
Joined: Fri Sep 02, 2016 3:14 am
Completed: Multiverse Heroes, Space Hamster in Turmoil
Location: Puerto Rico
Contact:

(Solved) How to run "focus_down" from config.keymap as a Screen Action?

#1 Post by SypherZent »

I want controller support for LEFT/RIGHT/UP/DOWN to perform their normal focus_(direction) functionality as per config.keymap.
However, I also want them to run other functions.

In screens, I use:

Code: Select all

key "K_RIGHT" action Function(DoSomething)
However, the moment I use the screen to take control of the K_RIGHT button, it no longer performs focus_right as per config.keymap.

How can I tell it, in a screen action, to do focus_right as well as the custom function called DoSomething?

My goal is something like this:

Code: Select all

key "K_RIGHT" action Function(DoSomething), Function(focus_right)
However, this crashes the game, as focus_right is not defined as a function that can be used this way.

Solved
I used a different method, so I no longer need to know how to do this.
Method described in the solution to viewtopic.php?f=8&t=60375

Post Reply

Who is online

Users browsing this forum: Google [Bot]