# Is there a "proxy\_enabled" message or function?

**URL:** <https://forum.defold.com/t/is-there-a-proxy-enabled-message-or-function/82567>\
**Category:** Questions\
**Created:** [March 19, 2026, 7:00am UTC](https://forum.defold.com/t/is-there-a-proxy-enabled-message-or-function/82567 "2026-03-19T07:00:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![scandalousowl](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@scandalousowl](https://forum.defold.com/u/scandalousowl)\
**Post date:** [March 19, 2026, 7:00am UTC](https://forum.defold.com/t/is-there-a-proxy-enabled-message-or-function/82567/1 "2026-03-19T07:00:13Z")

</div>

Is there a message or init function that can be called when a proxy is enabled? Similar to loading a proxy and getting a “proxy\_loaded” message back, or doing msg.post(proxy, init) and triggering the init function.

I managed to accomplish the same by posting another message after msg.post(proxy, enable) and using on\_message on the reciever, but it feels like there should be a better way?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [March 19, 2026, 7:41am UTC](https://forum.defold.com/t/is-there-a-proxy-enabled-message-or-function/82567/2 "2026-03-19T07:41:10Z")

</div>

> [@scandalousowl](#):
>
> Is there a message or init function that can be called when a proxy is enabled?

Why do you need this?

---

<div class="post-metadata">

**Author:** ![scandalousowl](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@scandalousowl](https://forum.defold.com/u/scandalousowl)\
**Post date:** [March 21, 2026, 8:24am UTC](https://forum.defold.com/t/is-there-a-proxy-enabled-message-or-function/82567/3 "2026-03-21T08:24:27Z")

</div>

I’ve got a cursor sprite in each proxy, and it ‘jumps’ when I change scene. Let’s say I’m going from Scene A to B, and my mouse moved from (5,5) to (10, 10). When I change back to Scene A, the cursor will jump from (10,10) to (5,5) until I move my mouse. I have the get & set function in init(), so its not a problem when I load the scene for the first time.

---

<div class="post-metadata">

**Author:** ![a-daniel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/a-daniel/32/39781_2.png) [@a-daniel](https://forum.defold.com/u/a-daniel)\
**Post date:** [March 22, 2026, 10:07pm UTC](https://forum.defold.com/t/is-there-a-proxy-enabled-message-or-function/82567/4 "2026-03-22T22:07:08Z")

</div>

According to the documentation there is no “proxy\_enabled” messsage but you can send your own “proxy\_enabled” message. I’m thinking something similar to this:

```lua
msg.post(proxy_component,”enable”)
msg.post(cursor_url, “proxy_enabled”)

```

Personally I would try to avoid the need to update cursor position on enable by creating a single cursor GO in the bootstrap collection instead of having a cursor GO in each loaded collection.

---

<div class="post-metadata">

**Author:** ![Mathias](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias/32/44015_2.png) [@Mathias](https://forum.defold.com/u/Mathias)\
**Post date:** [March 23, 2026, 6:26am UTC](https://forum.defold.com/t/is-there-a-proxy-enabled-message-or-function/82567/5 "2026-03-23T06:26:31Z")

</div>

Or centralise your cursor state in a lua module, make on\_input function just set this data and on\_update functions just read this data. So every collections use the same state everywhere. You can still keep your cursor GO in each collections (I guess you use a cursor with collision shape to interact with gameobjects, so you need it in every collection proxies)

---

<div class="post-metadata">

**Author:** ![scandalousowl](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@scandalousowl](https://forum.defold.com/u/scandalousowl)\
**Post date:** [March 26, 2026, 2:40pm UTC](https://forum.defold.com/t/is-there-a-proxy-enabled-message-or-function/82567/6 "2026-03-26T14:40:26Z")

</div>

Thanks for the suggestion! I am using a collision object with my cursor hence why I need a cursor GO in every collection.

I have thought about using on\_update but it feels like it’ll take more resource compared to on\_input? Anyway I’m already doing msg.post and on\_message to make my on “proxy enabled” function, so I guess I’ll keep doing that, thanks.
