Functions with underscores _ in their name.
Functions with underscores _ in their name.
Noticed something funny today. If you have a function with an underscore in the title, you can't connect a button to it in the dungeon editor interface. Nothing with an underscore will show up in the 'action' drop-down list.
Re: Functions with underscores _ in their name.
Yup, seen that. LOTS of confusion ensued.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
Re: Functions with underscores _ in their name.
I hadn't actually seen the consequences of using underscores for functions, but I am strict adherer to the conventions of underscores_for_variables and camelCase() for functions.
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: Functions with underscores _ in their name.
I use camelCase for everything, just makes a lot of sense to me, but having a different format for variables might be helpful, I'll consider it
Finished Dungeons - complete mods to play
Re: Functions with underscores _ in their name.
I've been using it as a feature!
My script is large and in charge with plenty of functions, but only a few of them are intended to be linked to buttons. So any function that I don't want to use with a button, I put an underscore in the name. Then when I am linking up any buttons, there aren't a billion options to choose from.
My script is large and in charge with plenty of functions, but only a few of them are intended to be linked to buttons. So any function that I don't want to use with a button, I put an underscore in the name. Then when I am linking up any buttons, there aren't a billion options to choose from.
Re: Functions with underscores _ in their name.
It's a feature I guess the idea was that if the function name starts or ends with an underscore it's private to the script and therefore not exposed in the dropdown. The check seems to be a little too trigger happy and rejects all functions with underscores in their name.
Re: Functions with underscores _ in their name.
Ha! Good to know. So Balthasar was the only one adept enough to figure that out on his own
Finished Dungeons - complete mods to play