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.

Updated loading scheme (is is true btw?) handling

Discussion in 'Programming Questions and Suggestions' started by 4o, Jan 13, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. 4o Apprentice Engineer

    Messages:
    316
    Good day.

    looks like much changed while i was away for 7 updates.

    i have a question. i'll phrase it as bug report (not implying that it in fact is).
    + all description is related to singleplayer mode

    what i have:
    a "mining rig" with pistons and drill controlled by PB.

    grid setup:

    (timer, PB) -> piston -> piston -> piston -> drill

    PB has Program() function set up to find trigger block, trigger is (ApplyAction("TriggerNow")), populate pistons and drill variables.


    what i see:
    script compiles and does its job. problems start when i reload the world:
    1) PB finds trigger block, but TriggerNow action has no effect (timer rests in "started but not counting" state, which is strange by itself)
    2) PB fails to find a drill

    recompiling the script after world is fully loaded works like a charm: trigger block is started, all functional blocks are found;

    Questions:
    1) am i right that singleplayer world now load "on the go"? is it true for MP? (inability to find blocks, missing grids from grid list);
    2) why timer block is found, but not started upon world loading?
    3) why PB is unable to find blocks?
    4) is there anything i can do to overcome this behavior?
    5) what are the options from (4)?
     
  2. Wicorel Senior Engineer

    Messages:
    1,242
    Sounds like everything in the game is not yet initialized when the constructor (Program) is called.

    Are you using Stable or Dev?

    For a work-around, you can 'start' the timer and then complete your script's initialization on the first run.
     
  3. 4o Apprentice Engineer

    Messages:
    316
    i'm using dev. will check if switching to stable solves my problems.

    that timer trick was meant to be a workaround, but as i've said timer.ApplyAction("TriggerNow") or timer.ApplyAction("Start") have no effect:

    after work is loaded all timers (that we counting at the moment of last save) rest in strange state: they are started, but have no countdown.
    applying "TriggerNow" and "Start" actions on them from Program() have no effect: they are still not counting down ( :
     
    Last edited: Jan 21, 2017
Thread Status:
This last post in this thread was made more than 31 days old.