Skip to content

Program registration #47

@BrunoMine

Description

@BrunoMine

I'm trying to create a program and get this for now.

npc.programs.register("sunos:interagir", function(self, args)
	local tempo = args.time or 5
	local pos = npc.programs.helper.get_pos_argument(self, args.pos, true)
	
	-- Rotate
	npc.exec.proc.enqueue(self, "advanced_npc:rotate", {
		start_pos = self.object:getpos(),
		end_pos = pos,
	})
	
	-- Wait
	npc.exec.proc.enqueue(self, "advanced_npc:wait", {
		time = time,
	})
end)

It looks like the NPC does not rotate to the right place.

I did not understand correctly where the temporary data is and how to reference future places.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions