Jump to content

58 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
2 hours ago, AmiPolizeiFunk said:

Well I noticed that there are variables in the light effects to say which axis to rotate and at what speed. I was able to edit them in ModTools, and the spotlight started animating round and round... looking just like a lighthouse or movie searchlight. If I knew how to make a quick .gif of it, I would have, cause it was really cool looking.

Right, but those values can not be saved, so you would need an additional mod that creates a new light effect.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

     

    Released a new asset, which is a collaboration with vasimr22 (who has been making some great airport assets). It's a runway threshold lights prop. Originally we wanted to do some green lights, but 

    Aircraft Light Right
      Type: Spot
      Intensity: 1
      Blink Type: None
      Base Color: A0FFA0

     

    from the list on github didn't work.

     

    In fact, many of the light types didn't work. Is there a special trick to get the vehicle light effects to work on a prop?

     

    PreviewImage.png.242be86b477105e2cf770cbff1fafe43.png

    https://steamcommunity.com/sharedfiles/filedetails/?id=908980935

     

    FINAL WORKING SCRIPT FOR FOUR LIGHT EFFECTS:

     
    
    // --- FIRST LIGHT EFFECT ---
    // Used light effect
    var lightEffect1 = EffectCollection.FindEffect("Flood Light Short Red") as LightEffect;
    // Final position in prop
    Vector3 pos1 = new Vector3(0f,1f,0f); 
    // 
    // Final direction in prop
    Vector3 dir1 = new Vector3(0f,0.2588f,0.9659f);
    // pointing forward about 15deg
    var propEffect1 = new PropInfo.Effect {m_effect = lightEffect1, m_position = pos1, m_direction = dir1 };
    	
    // --- SECOND LIGHT EFFECT ---
    // Used light effect
    var lightEffect2 = EffectCollection.FindEffect("Flood Light Short Red") as LightEffect;
    // Final position in prop
    Vector3 pos2 = new Vector3(-1.7f,1f,0f); 
    // 
    // Final direction in prop
    Vector3 dir2 = new Vector3(0f,0.2588f,0.9659f);
    //  
    var propEffect2 = new PropInfo.Effect {m_effect = lightEffect2, m_position = pos2, m_direction = dir2 };
    	
    // --- THIRD LIGHT EFFECT ---
    var lightEffect3 = EffectCollection.FindEffect("Flood Light Short Red") as LightEffect;
    Vector3 pos3 = new Vector3(-3.4f,1f,0f);
    // ..
    Vector3 dir3 = new Vector3(0f,0.2588f,0.9659f);
    // ..
    var propEffect3 = new PropInfo.Effect {m_effect = lightEffect3, m_position = pos3, m_direction = dir3 };
    	
    // --- FOURTH LIGHT EFFECT ---
    var lightEffect4 = EffectCollection.FindEffect("Flood Light Short Red") as LightEffect;
    Vector3 pos4 = new Vector3(-5.1f,1f,0f);
    // ..
    Vector3 dir4 = new Vector3(0f,0.2588f,0.9659f);
    // ..
    var propEffect4 = new PropInfo.Effect {m_effect = lightEffect4, m_position = pos4, m_direction = dir4 };
    	
    // Apply effects to prop
    (GameObject.Find("Tool Controller").GetComponent<ToolController>().m_editPrefabInfo as PropInfo).m_effects = new PropInfo.Effect[] { propEffect1, propEffect2, propEffect3, propEffect4};
    (GameObject.Find("Tool Controller").GetComponent<ToolController>().m_editPrefabInfo as PropInfo).m_hasEffects = true;

     

    • Like 4

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    6 hours ago, AmiPolizeiFunk said:

    Any ideas, anyone? green light effects on props?

    You can find all available effects (also sound effects) in the EffectCollection in the ModTools scene explorer.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I'm liking this script. Here's one with eighteen light effects. :)20170514232642_1.thumb.jpg.0d2f58dfdfce4c2a05b0496e5b541b45.jpg

    Spoiler
    
    // --- FIRST LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect1 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    
    // Final position in prop
    Vector3 pos1 = new Vector3(0f,16f,0f); 
    // 
    
    // Final direction in prop
    Vector3 dir1 = new Vector3(0f,-2.00f,-1f);
    // pointing up 
    
    var propEffect1 = new PropInfo.Effect {m_effect = lightEffect1, m_position = pos1, m_direction = dir1 };
    
    
    // --- SECOND LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect2 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    
    // Final position in prop
    Vector3 pos2 = new Vector3(-1.923f,16f,0f); 
    // 
    
    // Final direction in prop
    Vector3 dir2 = new Vector3(0f,-2.00f,-1f);
    //  
    
    var propEffect2 = new PropInfo.Effect {m_effect = lightEffect2, m_position = pos2, m_direction = dir2 };
    
    
    // --- THIRD LIGHT EFFECT ---
    
    var lightEffect3 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos3 = new Vector3(-3.817f,16f,0f);
    // ..
    Vector3 dir3 = new Vector3(0f,-2.00f,-1f);
    // ..
    
    var propEffect3 = new PropInfo.Effect {m_effect = lightEffect3, m_position = pos3, m_direction = dir3 };
    
    
    // --- FOURTH LIGHT EFFECT ---
    
    var lightEffect4 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos4 = new Vector3(-5.751f,16f,0f);
    // ..
    Vector3 dir4 = new Vector3(0f,-2.00f,-1f);
    // ..
    var propEffect4 = new PropInfo.Effect {m_effect = lightEffect4, m_position = pos4, m_direction = dir4 };
    
    
    // --- 5 LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect5 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    
    // Final position in prop
    Vector3 pos5 = new Vector3(1.923f,16f,0f); 
    // 
    
    // Final direction in prop
    Vector3 dir5 = new Vector3(0f,-2.00f,-1f);
    // pointing up 
    
    var propEffect5 = new PropInfo.Effect {m_effect = lightEffect5, m_position = pos5, m_direction = dir5 };
    
    
    // --- 6 LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect6 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    
    // Final position in prop
    Vector3 pos6 = new Vector3(3.817f,16f,0f); 
    // 
    
    // Final direction in prop
    Vector3 dir6 = new Vector3(0f,-2.00f,-1f);
    //  
    
    var propEffect6 = new PropInfo.Effect {m_effect = lightEffect6, m_position = pos6, m_direction = dir6 };
    
    
    // --- 7 LIGHT EFFECT ---
    
    var lightEffect7 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos7 = new Vector3(5.751f,16f,0f);
    // ..
    Vector3 dir7 = new Vector3(0f,-2.00f,-1f);
    // ..
    
    var propEffect7 = new PropInfo.Effect {m_effect = lightEffect7, m_position = pos7, m_direction = dir7 };
    
    
    // --- 8 LIGHT EFFECT ---
    
    var lightEffect8 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos8 = new Vector3(7.666f,16f,0f);
    // ..
    Vector3 dir8 = new Vector3(0f,-2.00f,-1f);
    // ..
    var propEffect8 = new PropInfo.Effect {m_effect = lightEffect8, m_position = pos8, m_direction = dir8 };
    
    
    // --- 9 LIGHT EFFECT ---
    
    var lightEffect9 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos9 = new Vector3(-7.666f,16f,0f);
    // ..
    Vector3 dir9 = new Vector3(0f,-2.00f,-1f);
    // ..
    var propEffect9 = new PropInfo.Effect {m_effect = lightEffect9, m_position = pos9, m_direction = dir9 };
    
    
    // --- 10 LIGHT EFFECT ---
    
    var lightEffect10 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos10 = new Vector3(0f,3.25f,-1.6f);
    // ..
    Vector3 dir10 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect10 = new PropInfo.Effect {m_effect = lightEffect10, m_position = pos10, m_direction = dir10 };
    
    // --- 11 LIGHT EFFECT ---
    
    var lightEffect11 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos11 = new Vector3(1.923f,3.25f,-1.6f);
    // ..
    Vector3 dir11 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect11 = new PropInfo.Effect {m_effect = lightEffect11, m_position = pos11, m_direction = dir11 };
    
    // --- 12 LIGHT EFFECT ---
    
    var lightEffect12 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos12 = new Vector3(-1.923f,3.25f,-1.6f);
    // ..
    Vector3 dir12 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect12 = new PropInfo.Effect {m_effect = lightEffect12, m_position = pos12, m_direction = dir12 };
    
    // --- 13 LIGHT EFFECT ---
    
    var lightEffect13 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos13 = new Vector3(3.817f,3.25f,-1.6f);
    // ..
    Vector3 dir13 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect13 = new PropInfo.Effect {m_effect = lightEffect13, m_position = pos13, m_direction = dir13 };
    
    // --- 14 LIGHT EFFECT ---
    
    var lightEffect14 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos14 = new Vector3(-3.817f,3.25f,-1.6f);
    // ..
    Vector3 dir14 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect14 = new PropInfo.Effect {m_effect = lightEffect14, m_position = pos14, m_direction = dir14 };
    
    // --- 15 LIGHT EFFECT ---
    
    var lightEffect15 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos15 = new Vector3(5.751f,3.25f,-1.6f);
    // ..
    Vector3 dir15 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect15 = new PropInfo.Effect {m_effect = lightEffect15, m_position = pos15, m_direction = dir15 };
    
    // --- 16 LIGHT EFFECT ---
    
    var lightEffect16 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos16 = new Vector3(-5.751f,3.25f,-1.6f);
    // ..
    Vector3 dir16 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect16 = new PropInfo.Effect {m_effect = lightEffect16, m_position = pos16, m_direction = dir16 };
    
    // --- 17 LIGHT EFFECT ---
    
    var lightEffect17 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos17 = new Vector3(7.666f,3.25f,-1.6f);
    // ..
    Vector3 dir17 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect17 = new PropInfo.Effect {m_effect = lightEffect17, m_position = pos17, m_direction = dir17 };
    
    // --- 18 LIGHT EFFECT ---
    
    var lightEffect18 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    Vector3 pos18 = new Vector3(-7.666f,3.25f,-1.6f);
    // ..
    Vector3 dir18 = new Vector3(0f,3f,-1f);
    // ..
    var propEffect18 = new PropInfo.Effect {m_effect = lightEffect18, m_position = pos18, m_direction = dir18 };
    
    
    // Apply effects to prop
    (GameObject.Find("Tool Controller").GetComponent<ToolController>().m_editPrefabInfo as PropInfo).m_effects = new PropInfo.Effect[] { propEffect1, propEffect2, propEffect3, propEffect4, propEffect5, propEffect6, propEffect7, propEffect8, propEffect9, propEffect10, propEffect11, propEffect12, propEffect13, propEffect14, propEffect15, propEffect16, propEffect17, propEffect18};
    (GameObject.Find("Tool Controller").GetComponent<ToolController>().m_editPrefabInfo as PropInfo).m_hasEffects = true;

     

     

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    So I used this script again :yes: And every time I do, I like to provide the code here.

    DKFXPk6XkAA8p8p.jpg

    http://steamcommunity.com/sharedfiles/filedetails/?id=1138693565

     

    Script for 3 lights (two high streetlights and one lower pedestrian light facing the sidewalk):

    // --- FIRST LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect1 = EffectCollection.FindEffect("Street Light Highway") as LightEffect;
    
    // Final position in prop
    Vector3 pos1 = new Vector3(0f,9.35f,-2.4f); 
    // this would be near the center of the prop facing the street, 9.35m above ground
    
    // Final direction in prop
    Vector3 dir1 = new Vector3(0f,-1f,0f);
    // pointing down 
    
    var propEffect1 = new PropInfo.Effect {m_effect = lightEffect1, m_position = pos1, m_direction = dir1 };
    
    
    // --- SECOND LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect2 = EffectCollection.FindEffect("Street Light Highway") as LightEffect;
    
    // Final position in prop
    Vector3 pos2 = new Vector3(0f,9.35f,2.4f); 
    // this would be near the center, on the other side, facing the street, 9.35m above ground
    
    // Final direction in prop
    Vector3 dir2 = new Vector3(0f,-1f,0f);
    // pointing down 
    
    var propEffect2 = new PropInfo.Effect {m_effect = lightEffect2, m_position = pos2, m_direction = dir2 };
    
    
    // --- THIRD LIGHT EFFECT ---
    
    var lightEffect3 = EffectCollection.FindEffect("Street Lamp") as LightEffect;
    Vector3 pos3 = new Vector3(-1f,3.5f,0f);
    // facing the sidewalk, 3.5m up
    Vector3 dir3 = new Vector3(0f,0f,0f);
    // not pointing (point light)
    
    var propEffect3 = new PropInfo.Effect {m_effect = lightEffect3, m_position = pos3, m_direction = dir3 };
    
    
    // Apply effects to prop
    (GameObject.Find("Tool Controller").GetComponent<ToolController>().m_editPrefabInfo as PropInfo).m_effects = new PropInfo.Effect[] { propEffect1, propEffect2, propEffect3};
    (GameObject.Find("Tool Controller").GetComponent<ToolController>().m_editPrefabInfo as PropInfo).m_hasEffects = true;

     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    This is a dummy script for SvenBerlin to add 5 lights to a prop. The light positions and directions need to be changed to suit his model.

    // dummy script for 5 lights
    // written for SvenBerlin by AmiPolizeiFunk Okt. 2017
    // thx Boformer for the original script
    
    
    // --- FIRST LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect1 = EffectCollection.FindEffect("Flood Light Short Orange") as LightEffect;
    // Final position in prop (light source location)
    Vector3 pos1 = new Vector3(0f,16f,0f); 
    // pointing direction via unity vector
    Vector3 dir1 = new Vector3(0f,-2.00f,1f);
    
    // combine the position and direction into a variable
    var propEffect1 = new PropInfo.Effect {m_effect = lightEffect1, m_position = pos1, m_direction = dir1 };
    
    
    // --- SECOND LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect2 = EffectCollection.FindEffect("Flood Light Short Orange") as LightEffect;
    // Final position in prop
    Vector3 pos2 = new Vector3(-1.923f,16f,0f); 
    // Final direction in prop
    Vector3 dir2 = new Vector3(0f,-2.00f,1f);
    
    var propEffect2 = new PropInfo.Effect {m_effect = lightEffect2, m_position = pos2, m_direction = dir2 };
    
    
    // --- THIRD LIGHT EFFECT ---
    
    var lightEffect3 = EffectCollection.FindEffect("Flood Light Short Orange") as LightEffect;
    // ..
    Vector3 pos3 = new Vector3(-3.817f,16f,0f);
    // ..
    Vector3 dir3 = new Vector3(0f,-2.00f,1f);
    
    var propEffect3 = new PropInfo.Effect {m_effect = lightEffect3, m_position = pos3, m_direction = dir3 };
    
    
    // --- FOURTH LIGHT EFFECT ---
    
    var lightEffect4 = EffectCollection.FindEffect("Flood Light Short Orange") as LightEffect;
    // ..
    Vector3 pos4 = new Vector3(-5.751f,16f,0f);
    // ..
    Vector3 dir4 = new Vector3(0f,-2.00f,1f);
    
    var propEffect4 = new PropInfo.Effect {m_effect = lightEffect4, m_position = pos4, m_direction = dir4 };
    
    
    // --- FIFTH LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect5 = EffectCollection.FindEffect("Flood Light Short Orange") as LightEffect;
    // Final position in prop
    Vector3 pos5 = new Vector3(1.923f,16f,0f); 
    // Final direction in prop
    Vector3 dir5 = new Vector3(0f,-2.00f,1f);
    
    var propEffect5 = new PropInfo.Effect {m_effect = lightEffect5, m_position = pos5, m_direction = dir5 };
    
    
    // Apply effects to prop
    (GameObject.Find("Tool Controller").GetComponent<ToolController>().m_editPrefabInfo as PropInfo).m_effects = new PropInfo.Effect[] {propEffect1, propEffect2, propEffect3, propEffect4, propEffect5};
    (GameObject.Find("Tool Controller").GetComponent<ToolController>().m_editPrefabInfo as PropInfo).m_hasEffects = true;

     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Two lights for reflex globe lamp, one pointing up and one pointing down:

    // --- FIRST LIGHT EFFECT ---
    
    // Used light effect
    var lightEffect1 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    
    // Final position in prop
    var pos1 = new Vector3(0f,1.25f,0f); 
    // this would be at the center of the prop, 1.25m above ground
    
    // Final direction in prop
    var dir1 = new Vector3(0f,-1f,0f);
    // this would be pointing down
    
    var propEffect1 = new PropInfo.Effect {m_effect = lightEffect1, m_position = pos1, m_direction = dir1 };
    
    
    // --- SECOND LIGHT EFFECT ---
    
    var lightEffect2 = EffectCollection.FindEffect("Flood Light Short White") as LightEffect;
    var pos2 = new Vector3(0f,0.25f,0f); 
    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;

    DUxRT70WsAAIlyL.jpg:large

    globelamp as 2-part prop (frame with lights & rotorshader ball) will be on the workshop soon

    • Like 4

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hi. Is there any way to change color of light effect on standart lamp prop? I need left lamp to be yellow like right lamp. I tried to play with scripts from previous posts but they seem to work for imported assets, not existing.

    lamp.jpg

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I'm surprised that the script won't work on a pre-existing game asset. Maybe post your script here so we can check it for bugs?

     

    Another option would be to export the lamp model with mod-tools and re-import it. Have you tried that?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Script is exatly the same like in first post exept I changed light effect to "Street Light Medium Road".
    I attached error message which appears after running script.

    BTW is there any way to find and change RGB values for light effect in scene explorer? 

    I cannot export this lamp. When I do this it tells me that mesh is not readable. After export I get only light but not lamp itself.

     

    lamp.jpg

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    the first post is for 2 light effects, and I think you only want one. Please copy your script here so we can check it. It may be as simple as a syntax error.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    There is a code:

     

    var lightEffect1 = EffectCollection.FindEffect("Street Light Medium Road") as LightEffect;
    
    var pos1 = new Vector3(0f,10f,-1f);
    
    var dir1 = new Vector3(0f,1f,0f);
    
    var propEffect1 = new PropInfo.Effect {m_effect = lightEffect1, m_position = pos1, m_direction = dir1 };
    
    var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; asset.m_effects = new PropInfo.Effect[] { propEffect1 }; asset.m_hasEffects = true;

     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Hmmm how do you even get that lamp into the editor? There's no "default" when you try to create a new asset with the streetlamp template.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Finally I solved the problem. Just downloaded similar lamp from workshop and for this one script worked perfectly. Thanks for your help. Now my streets have right vibe *:)

    lamps.jpg

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I decided to wade into custom light creation... following the main script (aside from removing the second variation, changing the numeric values).
    The location works fine but the direction has gone literally sideways!

    I checked the pre-fab setting for my light in Modtools, for some reason its not saving the direction info from the script.
    Its setting everything to 0. Any idea why that might be happening?

    Here is my script... When I put the center distance position on the right, it doesn't line up with the original location of the street light glow.
    I was worried that the light would be backward on the street if I turned my mesh direction in Blender, so I used the "Medium Street Light" as a reference.
    Maybe thats where I'm going wrong?
     

    
    
    var lightEffect1 = EffectCollection.FindEffect("Street Light Medium Road") as LightEffect;
    
    var pos1 = new Vector3(3.4f,10.5f,0f); 
    
    var dir1 = new Vector3(0f,-1f,0f);
    
    
    var propEffect1 = new PropInfo.Effect {m_effect = lightEffect1, m_position = pos1 };



    Full disclosure ... I am not using a local version of ModTools, its the one attached to the Workshop.
    I tried... but when I created a copy and put it in the my local "Mod" asset folder... its not showing up in the content manager.
    I'm assuming there is a step missing from the process that I don't know... *shrug*

    light_gone_sideways.jpg


    My Super Retro Steam Workshop

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    as for modtools did you enable it again when you run the game in -noworkshop mode? It needs to be enabled separately for each mode.

     

    As for your script, are you missing the very important last lines?

     

    // Apply effects to prop
    var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
    asset.m_effects = new PropInfo.Effect[] { propEffect1, propEffect2};
    asset.m_hasEffects = true;

    for one light it would just be

     

    // Apply effects to prop
    var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
    asset.m_effects = new PropInfo.Effect[] { propEffect1 };
    asset.m_hasEffects = true;

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    4 hours ago, AmiPolizeiFunk said:

    as for modtools did you enable it again when you run the game in -noworkshop mode? It needs to be enabled separately for each mode.

     

    As for your script, are you missing the very important last lines?
     

    Yeah I just missed pasting it. But I figured it out... I was somehow missing the direction info in the "Propeffect1" line of code. DUR!


    But I still don't know how to start the game in -noworkshop mode... I'm still too Noob I guess. LOL!


    My Super Retro Steam Workshop

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    11 hours ago, boformer said:

    Not always... I did search a few times
    I find that if I don't use exact terminology when searching info on this game I get nothing.
    I don't ask questions before googling first... but thanks for the help!


    My Super Retro Steam Workshop

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I couldn't do anything in this game w/o -noworkshop mode. Tell us exactly how far you get and maybe we can help you get it working. It's very very important imo.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 4/14/2018 at 4:08 AM, AmiPolizeiFunk said:

    I couldn't do anything in this game w/o -noworkshop mode. Tell us exactly how far you get and maybe we can help you get it working. It's very very important imo.

     

    Thanks! I got it figured out... and now I have way too many lamps. I gotta fiddle with the glow placement... but this is awesome.

    Thanks to everybody who knows how to do this coding business and sharing it with us mere mortals. :)

     

    too_many_lamps.jpg


    My Super Retro Steam Workshop

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hello....Can you mod the number of lights and type of lights in the mod tools? I did another test w the Wall-Mounted Floodlight template, and sure enough, it puts one light at 0,0,0. Now I just need to figure out how to position it and duplicate it? Is all of this possible w ModTools?

    pcb assembly canada

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 minutes ago, DaveRodda said:

    Hello....Can you mod the number of lights and type of lights in the mod tools? I did another test w the Wall-Mounted Floodlight template, and sure enough, it puts one light at 0,0,0. Now I just need to figure out how to position it and duplicate it? Is all of this possible w ModTools?

    You can create a script that adds multiple light effects at once. For example, this one adds 5 light effects (or just scroll up a bit):

    Take a close look at every line. The pattern is pretty simple.

    You can change the pos vectors to change the position of the effects, and the dir vectors to change the direction.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Just an FYI, you don't need a script to add effects (including lights) to a prop anymore after Industries. Just unroll Effects and click Add New

    derijXr.jpg

    • Like 1

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections