Difference between revisions of "Macros"

From LugdunonWiki
Jump to: navigation, search
(Consume Food)
(Set Lighting LOD (Level of Detail))
Line 7: Line 7:
  
  
 
+
This macro will cycle through 3 different light maps of differing quality:
  
  
 
<syntaxhighlight lang="javascript" line start="100" highlight="5" enclose="div">
 
<syntaxhighlight lang="javascript" line start="100" highlight="5" enclose="div">
 
+
function(macro)
 +
{
 +
    var lod=game.getCurrentGameState().environment.getLOD()+1;
 +
   
 +
    if(lod > 3)
 +
    {
 +
        lod=1;
 +
    }
 +
       
 +
    game.getCurrentGameState().environment.setLOD(lod);
 +
   
 +
    game.console.log("Lighting LOD (Level of Detail) is now: "+lod);
 +
}
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 18:38, 13 October 2013

Introduction

This page showcases macros that you might wish to incorporate into your gameplay. If you have a macro that you would like to see added, send it in an email to lugdunondev@gmail.com for review and possible inclusion here, with credit to you!

Set Lighting LOD (Level of Detail)

This macro will cycle through 3 different light maps of differing quality:


  1. function(macro)
  2. {
  3.     var lod=game.getCurrentGameState().environment.getLOD()+1;
  4.    
  5.     if(lod > 3)
  6.     {
  7.         lod=1;
  8.     }
  9.        
  10.     game.getCurrentGameState().environment.setLOD(lod);
  11.    
  12.     game.console.log("Lighting LOD (Level of Detail) is now: "+lod);
  13. }

Consume Food

  1.