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/10/02 10:34]
thomas [Code Structure]
hpl3:game:guides:scripters_guide [2014/11/12 11:38]
thomas [Code Structure]
Line 68: Line 68:
 //Note: In the code below, spaces are used to indent, do NOT use this, use tab instead!// //Note: In the code below, spaces are used to indent, do NOT use this, use tab instead!//
 <code c++>//​-------------------------------------------------- <code c++>//​--------------------------------------------------
- +
 /*Place any global values here. These must be const variables as they will not be saved*/ /*Place any global values here. These must be const variables as they will not be saved*/
 /*This is also the place for enums and classes, but these should be avoided whenever possible*/ /*This is also the place for enums and classes, but these should be avoided whenever possible*/
- +
 //​-------------------------------------------------- //​--------------------------------------------------
- +
 class cScrMap : iScrMap class cScrMap : iScrMap
 { {
  //​--------------------------------------------  //​--------------------------------------------
- +
  //////////////////////////////////////////////////////////////////////////////////////////​  //////////////////////////////////////////////////////////////////////////////////////////​
  // ==============  // ==============
Line 83: Line 83:
  // ==============  // ==============
  //​{///////////////////////////////////////////////////////////////////////////////////////​  //​{///////////////////////////////////////////////////////////////////////////////////////​
- +
  //​-------------------------------------------------------  //​-------------------------------------------------------
- +
  /*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  //} END MAIN CALLBACKS
-  +
- +
  //////////////////////////////////////////////////////////////////////////////////////////​  //////////////////////////////////////////////////////////////////////////////////////////​
  // ==============  // ==============
Line 98: Line 97:
  // ==============  // ==============
  //​{///////////////////////////////////////////////////////////////////////////////////////​  //​{///////////////////////////////////////////////////////////////////////////////////////​
- +
  //​-------------------------------------------------------  //​-------------------------------------------------------
- +
  /*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.*/
- +
  //​-------------------------------------------------------  //​-------------------------------------------------------
- +
  //} END MAIN FUNCTIONS  //} END MAIN FUNCTIONS
- +
  //////////////////////////////////////////////////////////////////////////////////////////​  //////////////////////////////////////////////////////////////////////////////////////////​
  // ==============  // ==============
Line 116: Line 115:
  // ==============  // ==============
  //​{//////////////////////////////////////////////////////////////////////////////////////​  //​{//////////////////////////////////////////////////////////////////////////////////////​
-  + 
- //​------------------------------------------------------- + /////////////////////////////////////////​ 
-  + // Scene X GENERAL 
 + //​{//////////////////////////////////////​ 
 +                 //​------------------------------------------------------- 
  /*Put any variables that are used by many events 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.*/  /*Put any functions that are used in more than one event in Scene X here.*/
-  +
  //​-------------------------------------------------------  //​-------------------------------------------------------
-   +                 //} END General 
-  +
  /////////////////////////////////////////​  /////////////////////////////////////////​
- // Scene X Event *Name Of Event*+ // Event *Name Of Event*
  //​{//////////////////////////////////////​  //​{//////////////////////////////////////​
-  +
  //​-------------------------------------------------------  //​-------------------------------------------------------
-  +
  /*Put any variables that 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.*/  /*Put any functionsthat are only used in Scene X, Event X here.*/
-  +
  //​-------------------------------------------------------  //​-------------------------------------------------------
-   + 
- //} END Scene X Event X + //} END Event *Name Of Event* 
-  +
  //} END SCENE X  //} END SCENE X
-  +
- +
  /////////////////////////////////////////​  /////////////////////////////////////////​
  // ==============  // ==============
Line 152: Line 153:
  // ==============  // ==============
  //​{//////////////////////////////////////​  //​{//////////////////////////////////////​
- +
  //​-------------------------------------------------------  //​-------------------------------------------------------
-  +
  /////////////////////////////////////////​  /////////////////////////////////////////​
  // Terminal *Name Of Terminal*  // Terminal *Name Of Terminal*
  //​{//////////////////////////////////////​  //​{//////////////////////////////////////​
-  +
  //​-------------------------------------------------------  //​-------------------------------------------------------
-  +
  /*Put any variables that are only used Terminal here.*/  /*Put any variables that are only used Terminal here.*/
-  +
  //​-------------------------------------------------------  //​-------------------------------------------------------
-  +
  /*Put any functions that are only used Terminal here.*/  /*Put any functions that are only used Terminal here.*/
-  +
  //​-------------------------------------------------------  //​-------------------------------------------------------
-  +
  //} END Terminal *Name Of Terminal*  //} END Terminal *Name Of Terminal*
- +
  //} END TERMINALS  //} END TERMINALS
- +
 } }
 </​code>​ </​code>​
hpl3/game/guides/scripters_guide.txt · Last modified: 2015/09/25 11:10 by jens