Advertisement
BloodknightStudios

TSShapeConstructor shape detail

Dec 15th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.33 KB | None | 0 0
  1. singleton TSShapeConstructor(DiceCubeDts)
  2. {
  3.    baseShape = "./DiceCube.dts";
  4. };
  5.  
  6. function DiceCubeDts::onLoad(%this)
  7. {
  8.     // Sets the size of the baseshape
  9.     %this.setDetailLevelSize("0", "600");
  10.    
  11.    
  12.     // This works
  13.     /* 
  14.     %this.addMesh("DiceCube 2", "art/shapes/dice/DiceCube2.dts", "DiceCube 0");
  15.     %this.setDetailLevelSize("2", "500");
  16.    
  17.     %this.addMesh("Dicecube 2", "art/shapes/dice/DiceCube3.dts", "DiceCube 0");
  18.     %this.setDetailLevelSize("2", "400");
  19.    
  20.     %this.addMesh("Dicecube 2", "art/shapes/dice/DiceCube4.dts", "DiceCube 0");
  21.     %this.setDetailLevelSize("2", "300");
  22.    
  23.     %this.addMesh("Dicecube 2", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  24.     %this.setDetailLevelSize("2", "200");
  25.    
  26.     %this.addMesh("Dicecube 2", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  27.     %this.setDetailLevelSize("2", "100");
  28.     */
  29.    
  30.     // This also works
  31.     /*
  32.     %this.addMesh("DiceCube2", "art/shapes/dice/DiceCube2.dts", "DiceCube 0");
  33.     %this.setDetailLevelSize("2", "500");
  34.    
  35.     %this.addMesh("Dicecube2", "art/shapes/dice/DiceCube3.dts", "DiceCube 0");
  36.     %this.setDetailLevelSize("2", "400");
  37.    
  38.     %this.addMesh("Dicecube2", "art/shapes/dice/DiceCube4.dts", "DiceCube 0");
  39.     %this.setDetailLevelSize("2", "300");
  40.    
  41.     %this.addMesh("Dicecube2", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  42.     %this.setDetailLevelSize("2", "200");
  43.    
  44.     %this.addMesh("Dicecube2", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  45.     %this.setDetailLevelSize("2", "100");
  46.     */
  47.  
  48.     /**
  49.     *   the above two methods create the name+detail using the addMesh()
  50.     *   it then replaces the +detail part using setDetailLevelSize(old, new)
  51.     *
  52.     *   They essentially create the following methods
  53.     *   It appears that names are arbitrarily irrelevent, but there must be a name.
  54.     */
  55.    
  56.     // This works too
  57.     //%this.addMesh("DiceCube 500", "art/shapes/dice/DiceCube2.dts", "DiceCube 0");
  58.     //%this.addMesh("Dicecube 400", "art/shapes/dice/DiceCube3.dts", "DiceCube 0");
  59.     //%this.addMesh("Dicecube 300", "art/shapes/dice/DiceCube4.dts", "DiceCube 0");
  60.     //%this.addMesh("Dicecube 200", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  61.     //%this.addMesh("Dicecube 100", "art/shapes/dice/DiceCube6.dts", "DiceCube 0");
  62.  
  63.     // This works too
  64.     //%this.addMesh("DiceCube500", "art/shapes/dice/DiceCube2.dts", "DiceCube 0");
  65.     //%this.addMesh("Dicecube400", "art/shapes/dice/DiceCube3.dts", "DiceCube 0");
  66.     //%this.addMesh("Dicecube300", "art/shapes/dice/DiceCube4.dts", "DiceCube 0");
  67.     //%this.addMesh("Dicecube200", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  68.     //%this.addMesh("Dicecube100", "art/shapes/dice/DiceCube6.dts", "DiceCube 0");
  69.    
  70.     // This works too
  71.     // I think this method best reflects the actuality of whats going on
  72.     %this.addMesh("detail500", "art/shapes/dice/DiceCube2.dts", "DiceCube 0");
  73.     %this.addMesh("detail400", "art/shapes/dice/DiceCube3.dts", "DiceCube 0");
  74.     %this.addMesh("detail300", "art/shapes/dice/DiceCube4.dts", "DiceCube 0");
  75.     %this.addMesh("detail200", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  76.     %this.addMesh("detail100", "art/shapes/dice/DiceCube6.dts", "DiceCube 0");
  77.    
  78.     // This Crashes (waahhhhh)
  79.     /*
  80.     %this.addMesh("500", "art/shapes/dice/DiceCube2.dts", "DiceCube 0");
  81.     %this.addMesh("400", "art/shapes/dice/DiceCube3.dts", "DiceCube 0");
  82.     %this.addMesh("300", "art/shapes/dice/DiceCube4.dts", "DiceCube 0");
  83.     %this.addMesh("200", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  84.     %this.addMesh("100", "art/shapes/dice/DiceCube5.dts", "DiceCube 0");
  85.     */
  86.    
  87.  
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement