BrunoMine

Results 47 comments of BrunoMine

I tried to do this but it is not working ```lua npc.programs.register("sunos:interact_furniture", function(self, args) local places = npc.locations.get_by_type(self, "furniture") p = places[math.random(1, #places)] npc.locations.add_shared(self, "sunos_furniture_target", "sunos_target", p.pos, p.access_node) npc.programs.instr.execute(self, "advanced_npc:interrupt",...

This program is apparently working I develop more in Portuguese (my native language) ```lua -- Interagir aleatoriamente com a mobilia da casa npc.programs.register("sunos:interagir_mobilia", function(self, args) -- Verificar distancia de casa...

He goes to bed, but then returns to work, then goes to bed (due to an external algorithm), then back to work. This is repeated all night until breakfast.

Repeat scheduling is required in case the NPC is spawned overnight or day, this ensures that at any time of spawn it is spawned, it receives a task. As you...

But, the #5 argument of `npc.exec.enqueue_program` mean this is a state program.

But this really looks like a redundancy. If I already informed you that this is a program state, then the API should do so.

When the schedule processes the `advanced_npc:idle` program in the queue, it should change the `self.execution.state_process` as this is the new program state. In addition, the program state does not stop...

But the `npc.exec.enqueue_program` already has a argument (5-bool) for this. that how you said: _it creates an entry in the process queue that is that of a state program_, but...

I understood the sequence, but I did not interrupt the state process, I just added new programs (`npc.exec.enqueue_program`) in the queue, so I think this should be done after a...

About the program state, okay, _they are managed only by the process scheduler_, but I think this can be manually enqueued too, because your operation is very simple (re-runs while...