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.

Detecting where a program run was called from.

Discussion in 'Programming (In-game)' started by Wolfsbane, Jun 30, 2020.

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

    Messages:
    2
    Is it possible to know where a programmable block was called from in the script?

    So in this case I have a sensor named "assignment A" and it calls the pb with the argument "OpenDoor" a generic call for all sensors with the same function on the grid.

    I then want to search for a door with name contains "assignment A" taken in this case from the name of the sensor that sent the run command.


    So in this case I only need to setup the names of sensors and doors to match without having to also set up a unique argument for each sensor to send the pb.
     
  2. Malware Master Engineer

    Messages:
    9,862
    I'm afraid not. You need to use arguments, that's what it's for.
     
  3. Wolfsbane Trainee Engineer

    Messages:
    2
    Thanks for taking the time to answer, shame about that.
     
  4. Mollymawk Apprentice Engineer

    Messages:
    124
    could the op not write his script to list all entities in range of each sensor? so the sensors do not have actions at all, the pb just polls sensors to list enteritis and decides what to do.
    ive done this to make spot lights on rotas to track my movements.
    it means code is running all the time. you need to make full use of the state machine thing, to keep ticks short.
     
Thread Status:
This last post in this thread was made more than 31 days old.