Skip to content

Instantly share code, notes, and snippets.

@boformer
Last active February 22, 2017 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boformer/9def9e179904092c0735ede28b4c1b85 to your computer and use it in GitHub Desktop.
Save boformer/9def9e179904092c0735ede28b4c1b85 to your computer and use it in GitHub Desktop.
Skylines Light Effect Mod Tools script
// --- FIRST LIGHT EFFECT ---
// Used light effect
var lightEffect1 = EffectCollection.FindEffect("Flood Light Orange") as LightEffect;
// Final position in prop
var pos1 = new Vector3(0f,10f,-1f);
// this would be near the center of the prop, 10m above ground
// Final direction in prop
var dir1 = new Vector3(0f,1f,0f);
// this would be up
var propEffect1 = new PropInfo.Effect {m_effect = lightEffect1, m_position = pos1, m_direction = dir1 };
// --- SECOND LIGHT EFFECT ---
var lightEffect2 = EffectCollection.FindEffect("Flood Light Orange") as LightEffect;
var pos2 = new Vector3(0f,10f,1f);
var dir2 = new Vector3(0f,1f,0f);
var propEffect2 = new PropInfo.Effect {m_effect = lightEffect2, m_position = pos2, m_direction = dir2 };
// Apply effects to prop
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
asset.m_effects = new PropInfo.Effect[] { propEffect1, propEffect2};
asset.m_hasEffects = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment