How to disable automatic collapsing of coding blocks (see below for further explanation)

So I am quite new to Quest and I have gathered some information on how to do things. But also came across something that has been bugging me for quite some time.

I am still unsure about the code view and prefer things in the building mode. But some things in my project, like certain functions, have a bigger amount of code in them.
(Example would be since I have a world timer that I wanted to have my NPC be dynamic and move to different rooms, like their home or working place, at different times of the day)
Something that I use, as a little trick to have a better overview, is to put large chunks of code that belongs together in a big if statement that just says "if(true)". The only purpose of that is so I can hide that chunk of code so I can work undisturbed on other parts of the same code.
Example:
https://cdn.discordapp.com/attachments/1070011252912439347/1070021795844993095/image.png

The only problem is that whenever I put in a new block into my code or change something it automatically expands everything. Is there a way to force it to stay closed until I manually open it? That also would solve the if(true) block solution as well.

Example:
I am working on the settings part of my game like so:
https://cdn.discordapp.com/attachments/1070011252912439347/1070018053477245051/image.png

Then I want to edit something, like add something new:
https://cdn.discordapp.com/attachments/1070011252912439347/1070018460840628255/image.png

After I change or add something it looks like this:
https://cdn.discordapp.com/attachments/1070011252912439347/1070018647696871514/image.png

Which is not wanted behavior since I want it to stay collapsed.
Can someone help me here?


It may require a rewrite in the Quest code itself.
But here is a thought (not tested)...
Have your if statements go to a sub or function.
Like: (not code, just idea)
if setting=True
goto settings sub
if skills=True
goto skill sub

This would give you a smaller if tree. Maybe this could work.


I use the if blocks so that I can collapse and hide code that I don't want to edit anymore. So that I can work on the stuff I need and don't be distracted or need to search through tons of code just to go to where I left off. But yes I think it is a Quest code rewrite thing. I just don't know how to do such a thing nor what I would type in.


There is no way to do it with Quest as it is. I had a look at updating Quest to do it, because I too found it annoyed, and could not work out a way (not to say someone else could not; I am not that familiar with VS/C#).


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums