Skip to content

Instantly share code, notes, and snippets.

@Sei-Lisa
Sei-Lisa / include-if-preprocessor-active.lsl
Last active October 15, 2017 16:17
LSL Trick: Do something when the file is run through a preprocessor, and something different otherwise
string dummy="/*\
";
// insert here code that will only be compiled when the preprocessor is active
#include "debug.h"
/*/""; // separator line
// insert here code that will only be compiled when the preprocessor is inactive
debug(string s){llOwnerSay(s);}
@Sei-Lisa
Sei-Lisa / reuse-of-data-elements.lsl
Created October 8, 2017 11:32
Data memory usage - Reusing list elements takes only 4 bytes per element.
list facial_anim_list =
[ "express_afraid_emote"
, "express_anger_emote"
, "express_laugh_emote"
, "express_bored_emote"
, "express_cry_emote"
, "express_embarrassed_emote"
, "express_sad_emote"
, "express_toothsmile"
, "express_smile"