Last active
February 22, 2017 16:31
-
-
Save boformer/9def9e179904092c0735ede28b4c1b85 to your computer and use it in GitHub Desktop.
Skylines Light Effect Mod Tools script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- 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