Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Code to Paint block

Discussion in 'Programming Questions and Suggestions' started by Feddas, Apr 15, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Feddas Trainee Engineer

    Messages:
    3
    Is it possible to use a script to change the paint color of a block? Is there a PropertyId to do this ? If it was "PaintColor", this would do what I wanted:

    List<IMyTerminalBlock> blocks = new List<IMyTerminalBlock>();
    GridTerminalSystem.GetBlocks(blocks);
    foreach (var block in blocks)
    {
    block.SetValue("PaintColor", Color.Red);
    }​

    It was possible, at least in the Jan 10, 2015 version of the game. According to this, https://forum.keenswh.com/threads/change-the-color-of-an-object-using-the-modding-api.7234737/
    I can't find a PropertyId that will do it by accessing the properties with .GetProperties() or see anything releveant on this page http://www.spaceengineerswiki.com/Programming_Guide/Action_List

    Is there a way other than using a PropertyId?
     
  2. Feddas Trainee Engineer

    Messages:
    3
    Got some answers to this on the subreddit. Jist is that it's not possible in vanilla. But you can edit the xml of blueprints to add paint colors.
     
  3. Phoera Senior Engineer

    Messages:
    1,713
    PB can't alter colors. and will never be able.
    what was is ModAPI, not PB API.
     
Thread Status:
This last post in this thread was made more than 31 days old.