Difference between revisions of "Macros"
From LugdunonWiki
(→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:
- 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);
- }