Can't handle input with proxies (SOLVED)

I have 3 collections : main, menu and level. Main is used only for loading other 2 collections using collection proxies. If I want to handle input in menu ui, i need to put msg.post(".","acquire_input_focus") not only in menu.gui_script but also in main.script (from main collection). Is it okey?

UPDATE:
Yes, it’s okey.

Even if the collection proxy’s game object contain no on_input() code at all, it must still send a “acquire_input_focus” message to itself to be added on top of the input stack.

1 Like

Yes, that can be attached to any script, just don’t use it like confetti.

1 Like

Hahaha :joy:

BTW @epycer.Iviv there is a limit to use focus. So in yours final functions it is good call the release action:

function final(self)
   msg.post(".", "release_input_focus")
end
1 Like

Problem is that I can’t handle focus in Menu without msg.post(".","acquire_input_focus") in main.script. Why is this so?

Input and collection proxies are explained in further detail here. Hope that helps

2 Likes

Thank you! Yes, it helps. I didn’t see it

3 Likes

There is a explication topic in this page too

2 Likes