hkzorman / advanced_npc

Advanced NPC for Minetest, using mobs_redo API
Other
18 stars 5 forks source link

Problem with actions argument of npc.add_schedule_entry method #27

Closed BrunoMine closed 6 years ago

BrunoMine commented 6 years ago

I believe the syntax is not correct, or maybe the API uses the same term actions to refer to two different things. https://github.com/hkzorman/advanced_npc/blob/175d07476daa5b217f9e32ee8837d315fc104feb/npc.lua#L945 1º case - actions is a table with some action aguments. In this case, the table must contain some values such as min_count and max_count for example. 2º case - actions is one of the arguments of the first case.

After all, what is the correct argument for actions? actions or actions?

BrunoMine commented 6 years ago

Maybe it's the first case https://github.com/hkzorman/advanced_npc/blob/175d07476daa5b217f9e32ee8837d315fc104feb/npc.lua#L943

hkzorman commented 6 years ago

Yes @BrunoMine , actions in this case is the first link. You provide a Lua array which will be executed in order. This Lua array can contain: