1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Access welder state

Discussion in 'Programming (In-game)' started by [LR]Neo007ca, Dec 23, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. [LR]Neo007ca

    [LR]Neo007ca Trainee Engineer

    Messages:
    4
    Hi,

    I want to do a factory production with a robotic-like arm with welder on it to build blueprint with projector. I currently want to move the welder to another place when it is not working (all blocks in range are built).

    After some minutes of search in source code, I realized that activated state are only for internal use and it looks like we can't access it in anyway:
    Code:
    private bool m_isActivated;
    private bool m_isActivatedOnSomething;
    protected int m_lastTimeActivate;
    (didn't find any Property to get it).

    So, is there a way to access welder state (something like "IsWelding") in programming block?

    Thank you!
     
  2. Wicorel

    Wicorel Senior Engineer

    Messages:
    1,263
    No.
     
  3. AneXus

    AneXus Trainee Engineer

    Messages:
    18
    The only thing you can check is whether the welder itself is on, you might be able to do some thing clever with the projector side though, you could check is projector.RemainingBlocks hasn't changed in a couple of script runs.
     
  4. [LR]Neo007ca

    [LR]Neo007ca Trainee Engineer

    Messages:
    4
    Good idea!
    I'll start with that,
    But it should be possible to access current welder state.
     
  5. AneXus

    AneXus Trainee Engineer

    Messages:
    18
    There's a lot of things we should be able to access we can't. Glad I could help.
     
  6. noxLP

    noxLP Junior Engineer

    Messages:
    729
    You know, in fact if a welder is actually welding or not is not a welder state, the welder state is if it's on or off... so yes, as @AneXus said, the better way to do it is to look at the proyector, you should test it tho, the proyector haD (past, there's a long time since i worked with it) some problems with that type of things, mostly with non-terminal blocks like armor blocks.
     
Thread Status:
This last post in this thread was made more than 31 days old.