User Tools

Site Tools


hpl3:game:guides:scripters_guide

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
hpl3:game:guides:scripters_guide [2014/03/12 08:24]
ian.thomas [Code Structure]
hpl3:game:guides:scripters_guide [2014/11/11 20:39]
thomas [Code Structure]
Line 76: Line 76:
 class cScrMap : iScrMap class cScrMap : iScrMap
 { {
-   //​--------------------------------------------+ //​--------------------------------------------
  
-   /////////////////////////////////////////​ + /////////////////////////////////////////////////​/////////////////////////////////////////​ 
-   ​// ============== + // ============== 
-   ​// MAIN CALLBACKS + // MAIN CALLBACKS 
-   ​// ============== + // ============== 
-   ​/////////////////////////////////////////​+ //​{//////////////////////////////////////////////​/////////////////////////////////////////​
  
-   //​-------------------------------------------------------+ //​-------------------------------------------------------
  
-   /*OnStart, OnEnter, OnLeave, Update (avoid this), OnAction (debug only), OnPlayerDead,​ etc are here.*/+ /*OnStart, OnEnter, OnLeave, Update (avoid this), OnAction (debug only), OnPlayerDead,​ etc are here.*/
  
-   //​-------------------------------------------------------+ //​-------------------------------------------------------
  
-   /////////////////////////////////////////​ + //} END MAIN CALLBACKS
-   // ============== +
-   // MAIN FUNCTIONS +
-   // ============== +
-   /////////////////////////////////////////​+
  
-   //-------------------------------------------------------+ //////////////////////////////////////////////////////////////////////////////////////////​ 
 + // ============== 
 + // MAIN FUNCTIONS 
 + // ============== 
 + //​{/////////////////////////////////////////////////////////////////////////////////////​//
  
-   /*Put any variables that are used in more than one scene here.*/+ //-------------------------------------------------------
  
-   //-------------------------------------------------------+ /*Put any variables that are used in more than one scene here.*/
  
-   /*Put any functions that are used in more than one scene here.*/+ //-------------------------------------------------------
  
-   //-------------------------------------------------------+ /*Put any functions that are used in more than one scene here.*/
  
-   /////////////////////////////////////////​ + //-------------------------------------------------------
-   // ============== +
-   // SCENE X *NAME OF SCENE* +
-   // ============== +
-   ///////////////////////////////////////​//+
  
-   //-------------------------------------------------------+ //} END MAIN FUNCTIONS
  
-   /*Put any variables that are used by many events in Scene here.*/+ //////////////////////////////////////////////////////////////////////////////////////////​ 
 + // ============== 
 + // SCENE X *NAME OF SCENE* 
 + // ============== 
 + //​{/////////////////////////////////////////////////////////////////////////////////////​/
  
-   //​-------------------------------------------------------+ //​-------------------------------------------------------
  
-   /*Put any functions ​that are used in more than one event in Scene X here.*/+ /*Put any variables ​that are used by many events ​in Scene X here.*/
  
-    ​//​-------------------------------------------------------+ //​-------------------------------------------------------
  
-    /////////////////////////////////////////​ + /*Put any functions that are used in more than one event in Scene X here.*/
-    // Scene X Event X *Name Of Event* +
-    ////////////////////////////////////////​/+
  
-    ​//​-------------------------------------------------------+  //​-------------------------------------------------------
  
-    ​/*Put any variables that are only used in Scene XEvent X here.*/+ /////////////////////////////////////////​ 
 + // Scene X Event X *Name Of Event* 
 + //​{/////////////////////////////////////​/
  
-    ​//​-------------------------------------------------------+  //​-------------------------------------------------------
  
-    ​/*Put any functionsthat ​are only used in Scene X, Event X here.*/+  /*Put any variables that are only used in Scene X, Event X here.*/
  
-    ​//​-------------------------------------------------------+  //​-------------------------------------------------------
  
-    /////////////////////////////////////////​ +  /*Put any functionsthat are only used in Scene X, Event X here.*/
-    // ============== +
-    // TERMINALS +
-    // ============== +
-    ///////////////////////////////////////​//+
  
-    ​//​-------------------------------------------------------+  //​-------------------------------------------------------
  
-    /////////////////////////////////////////​ +  //} END Scene X Event X
-    // Terminal *Name Of Terminal* +
-    ///////////////////////////////////////​//+
  
-    ​//-------------------------------------------------------+  //} END SCENE X
  
-    ​/*Put any variables that are only used Terminal here.*/+ /////////////////////////////////////////​ 
 + // ============== 
 + // TERMINALS 
 + // ============== 
 + //​{////////////////////////////////////​//
  
-    ​//​-------------------------------------------------------+  //​-------------------------------------------------------
  
-    ​/*Put any functions that are only used Terminal ​here.*/+  /////////////////////////////////////////​ 
 + // Terminal ​*Name Of Terminal* 
 + //​{/////////////////////////////////////​/
  
-    ​//​-------------------------------------------------------+  //​------------------------------------------------------- 
 + 
 + /*Put any variables that are only used Terminal here.*/ 
 + 
 + //​------------------------------------------------------- 
 + 
 + /*Put any functions that are only used Terminal here.*/ 
 + 
 + //​------------------------------------------------------- 
 + 
 + //} END Terminal *Name Of Terminal* 
 + 
 + //} END TERMINALS
  
 } }
Line 165: Line 177:
  
 **Note2:** \\ **Note2:** \\
 +Have snuck in some { and } to make code folding for sections possible.
 +
 +**Note3:** \\
 Remember to always separate functions with a comment line, like this: Remember to always separate functions with a comment line, like this:
  
Line 179: Line 194:
 } }
 </​code>​ </​code>​
 +
 ==== Naming Conventions ==== ==== Naming Conventions ====
  
hpl3/game/guides/scripters_guide.txt · Last modified: 2015/09/25 11:10 by jens