I do like Chaser & Damascus, try and keep related functions in the same sections. It gives a logical layout of the script in the same way a player would be progressing through a level. A section in my script tends to be around a specific event, room or section of a level, but also in Spacies we use a lot of scripts for custom entity or light actions that are not related to any event or room in particular, so I group those together too, with a title and description for the group
Additionally, since OnStart & OnEnter can get very, very cluttered on large levels I tend to have custom 'setup' functions where I put all of the function calls that normally go into OnStart & OnEnter, then call to those functions from OnStart & OnEnter so it's nice and clean.
lil' snippet here
void OnStart()
{
AutoDoorSetup(); // AUTO-DOORS
PowerCableSetup(); // POWER CABLE PUZZLE
HallwayLightsSetup(); // HALLWAY LIGHTS
}
...
/**************************************************
HALLWAY LIGHTS
Progressively turn on lights, with flickering
****************************************************/
void HallwayLightsSetup()
{
AddEntityCollideCallback("Player", "SA_hallway_lights_2", "Hallway_lights_start", true, 1);
for (int c=1; c<=12; c++)
{
SetLightVisible("spot_hallway_left_"+c, false);
SetLightVisible("spot_hallway_right_"+c, false);
SetLightVisible("point_hallway_"+c, false);
}
for (int c=1; c<=3; c++) SetLocalVarInt("inHallwayLightsFlicker"+c, 0);
}
...
This has an additional benefit of meaning that if a setup stage needs to be performed every time you go into the level, instead of having 2 lots of the same code in OnStart & OnEnter, I can simply call to 'EventSetup()' again and have the code only in 1 place if it needs changing
Basic rule is, your going to read your code 100 times more than you're going to write it, and chances are if your going to spend a decent amount of time on your mod your going to have to read code you wrote months ago, so having a logical & consistent layout that you understand is important, regardless of what that layout is