Page 1 of 1
extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Mon Jun 21, 2021 4:35 pm
by MrDoubleA
This is a library that adds a handful of extra settings for all NPC's. As a bonus, it also fixes the section index of out-of-bounds NPC's.
Download
Re: extraNPCProperties.lua - global NPC json files finally get used
Posted: Mon Jun 21, 2021 5:24 pm
by Chilly14
Woohoo! Can't wait to use this!
Re: extraNPCProperties.lua - global NPC json files finally get used
Posted: Tue Jun 22, 2021 9:26 am
by Murphmario
Looking at this, it seems really useful! Good job.
Re: extraNPCProperties.lua - global NPC json files finally get used
Posted: Tue Jun 22, 2021 1:58 pm
by Sambo
This looks pretty useful, especially the Tags and Max Generated NPCs settings. Nice work!
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Fri Jul 02, 2021 1:09 pm
by MrDoubleA
Choccycon's devkit made me realise some tiny bugs were in here! So have v1.0.1.
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Sat Jul 03, 2021 9:37 am
by ShadowLabrys101
So, how do you add these to an episode?
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Sat Jul 03, 2021 10:20 am
by MrDoubleA
ShadowLabrys101 wrote: ↑Sat Jul 03, 2021 9:37 am
So, how do you add these to an episode?
Unzip it in your episode/level folder and put this in your luna.lua file:
Code: Select all
local extraNPCProperties = require("extraNPCProperties")
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Fri Jul 16, 2021 4:41 pm
by ChunkyChimp
Where do I find this example screenshot ingame? I have the "local require" part in luna.lua done.
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Fri Jul 16, 2021 9:42 pm
by MrDoubleA
ChunkyChimp wrote: ↑Fri Jul 16, 2021 4:41 pm
Where do I find this example screenshot ingame? I have the "local require" part in luna.lua done.
Right click any NPC in the editor and scroll down. If you have it installed correctly, you should see the options there.
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Fri Jul 16, 2021 9:52 pm
by ChunkyChimp
MrDoubleA wrote: ↑Fri Jul 16, 2021 9:42 pm
ChunkyChimp wrote: ↑Fri Jul 16, 2021 4:41 pm
Where do I find this example screenshot ingame? I have the "local require" part in luna.lua done.
Right click any NPC in the editor and scroll down. If you have it installed correctly, you should see the options there.
ok then i must have it installed incorrectly. i will reinstall and try again
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Tue Jul 20, 2021 3:50 pm
by TheGameyFireBro105
Could you add an option to make an NPC spawn like a Projectile Cheep Cheep?
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Sat Jun 04, 2022 10:19 pm
by Chilly14
What is the exact method for using tags in Lua? As in getting all NPCs with a specific tag.
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Fri Jun 10, 2022 6:59 pm
by MrDoubleA
Chilly14 wrote: ↑Sat Jun 04, 2022 10:19 pm
What is the exact method for using tags in Lua? As in getting all NPCs with a specific tag.
You can do:
Code: Select all
for _,v in ipairs(extraNPCProperties.getWithTag("myTag")) do
-- my code here
end
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Fri Jun 10, 2022 8:24 pm
by Chilly14
MrDoubleA wrote: ↑Fri Jun 10, 2022 6:59 pm
Chilly14 wrote: ↑Sat Jun 04, 2022 10:19 pm
What is the exact method for using tags in Lua? As in getting all NPCs with a specific tag.
You can do:
Code: Select all
for _,v in ipairs(extraNPCProperties.getWithTag("myTag")) do
-- my code here
end
Ah, thanks!
Re: extraNPCProperties.lua (v1.0.1) - global NPC json files finally get used
Posted: Fri Mar 08, 2024 12:12 am
by mariobrigade2018
MrDoubleA wrote: ↑Fri Jun 10, 2022 6:59 pm
Chilly14 wrote: ↑Sat Jun 04, 2022 10:19 pm
What is the exact method for using tags in Lua? As in getting all NPCs with a specific tag.
You can do:
Code: Select all
for _,v in ipairs(extraNPCProperties.getWithTag("myTag")) do
-- my code here
end
Where would I put this piece of code?