Editor bug: connector actions sometimes don't appear

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Editor bug: connector actions sometimes don't appear

Post by minmay »

I notice that sometimes when I add a connector in the editor, sometimes the drop-down menu for the target action will be completely empty even though the target has actions. E.g. I connect a button to a script entity with a function, but nothing shows up in the drop-down menu. If I reload the dungeon and look at the connector again, the function appears in the drop-down menu.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Isaac
Posts: 3189
Joined: Fri Mar 02, 2012 10:02 pm

Re: Editor bug: connector actions sometimes don't appear

Post by Isaac »

minmay wrote:I notice that sometimes when I add a connector in the editor, sometimes the drop-down menu for the target action will be completely empty even though the target has actions. E.g. I connect a button to a script entity with a function, but nothing shows up in the drop-down menu. If I reload the dungeon and look at the connector again, the function appears in the drop-down menu.
Well... I would have mentioned the underscores in the name feature, but that it refreshes and displays is a different issue.

Are these [the target] external scripts? It seems that the editor even has to be restarted for some changes to be noticed. I've not seen what you describe happen before. Is any of it repeatable?
Last edited by Isaac on Sun Dec 07, 2014 2:43 am, edited 1 time in total.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Editor bug: connector actions sometimes don't appear

Post by minmay »

Happens with embedded scripts.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Isaac
Posts: 3189
Joined: Fri Mar 02, 2012 10:02 pm

Re: Editor bug: connector actions sometimes don't appear

Post by Isaac »

minmay wrote:Happens with embedded scripts.
And it's not the underscore in the name? [I assume not.]

I guess an example would be needed.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Editor bug: connector actions sometimes don't appear

Post by minmay »

No, it's not a private function or other obvious coding mistake. I cannot give exact steps to reproduce the behaviour because it seems completely unpredictable and is quite rare. An example: I placed a button, placed a script entity, put a function in the script entity, added a connector from the button, and the function didn't show up in the menu. After reloading with ^r the function appeared in the menu. Normally I do not have to reload for this to happen.
I do not know if it happens with connectors to other objects; I haven't had it happen yet but I almost never use connectors to objects other than script entities.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Isaac
Posts: 3189
Joined: Fri Mar 02, 2012 10:02 pm

Re: Editor bug: connector actions sometimes don't appear

Post by Isaac »

minmay wrote:No, it's not a private function or other obvious coding mistake. I cannot give exact steps to reproduce the behaviour because it seems completely unpredictable and is quite rare. An example: I placed a button, placed a script entity, put a function in the script entity, added a connector from the button, and the function didn't show up in the menu. After reloading with ^r the function appeared in the menu. Normally I do not have to reload for this to happen.
I do not know if it happens with connectors to other objects; I haven't had it happen yet but I almost never use connectors to objects other than script entities.
There are certainly bugs in the editor... When I load it, it crashes about 50/50. :(
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Editor bug: connector actions sometimes don't appear

Post by minmay »

So I figured out what causes this bug to occur. If an object in the editor has a connector to an object with the same id, the connector actions won't appear. Even if you change the id afterwards, the actions won't appear until you reload the mod.
This happened to me a lot because I was doing things like making a door called "westDoor" and then a lever connected to it called "westDoorLever"; when I finish typing the "westDoor" part of the latter, the action disappears.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply