spawnzones.lua - Make your setups actually work

Share and discuss custom LunaLua code and content packs for SMBX2.
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8877
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: spawnzones.lua - Make your setups actually work

Postby Enjl » Wed Aug 26, 2020 1:08 am

Hammerless Penguin wrote:
Sun Aug 23, 2020 5:14 pm
Sorry if this sounds like a dumb question but how do you use this? I placed the blue sizable block where I want my npcs to stay onscreen but nothing happens. Can you give a better example how to use this like how it is used in the editor?
All NPCs in the zone stay spawned for as long as the player is also in the zone. Thus, place the zones in such a way that it encompasses NPCs that are offscreen when the player enters it.
Ideas are useless if you can't make them real.
Image

All my assets from packs and episodes are free to use for non-Novaverse levels and projects, as long as proper credit is given.

User avatar
MrDoubleA
Bit
Bit
Posts: 134
Joined: Mon Aug 20, 2018 7:02 am
Contact:

Re: spawnzones.lua - Make your setups actually work

Postby MrDoubleA » Thu Aug 27, 2020 11:34 am

Is there a specific reason that this only checks if an NPC is off to the left or right of the screen and not the top/bottom?
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8877
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: spawnzones.lua - Make your setups actually work

Postby Enjl » Thu Aug 27, 2020 11:54 am

MrDoubleA wrote:
Thu Aug 27, 2020 11:34 am
Is there a specific reason that this only checks if an NPC is off to the left or right of the screen and not the top/bottom?
... I was wondering why it didn't work in certain situations....

Fixed, thanks.
Ideas are useless if you can't make them real.
Image

All my assets from packs and episodes are free to use for non-Novaverse levels and projects, as long as proper credit is given.

JayTheUnwise123
Shy Guy
Shy Guy
Posts: 8
Joined: Mon Sep 28, 2020 2:20 am

Re: spawnzones.lua - Make your setups actually work

Postby JayTheUnwise123 » Wed Oct 14, 2020 10:03 pm

Is this still not compatible with 2P? Also, what exactly happens when attempting to use it in 2 player?

If it's still mostly functional I would hate to waste your time asking to make a fix.

User avatar
55jedat555
Fighter Fly
Fighter Fly
Posts: 64
Joined: Sat Feb 28, 2015 11:35 am
Flair: flare
Contact:

Re: spawnzones.lua - Make your setups actually work

Postby 55jedat555 » Tue Oct 20, 2020 2:02 pm

So for some reason trying to spawn in an npc that's outside of the section boundary only works in section 0. I wasn't really able to tell what would be causing this by looking at the code, so I'm assuming it's a redigit thing?
My YouTube channel: jedat555
Check out my levels!
"Don't trust your eyes, trust mine."
Image
I support:
Spoiler: show
Image
Image
Image
Image
Image
Image

User avatar
MrDoubleA
Bit
Bit
Posts: 134
Joined: Mon Aug 20, 2018 7:02 am
Contact:

Re: spawnzones.lua - Make your setups actually work

Postby MrDoubleA » Sun Oct 25, 2020 6:51 am

55jedat555 wrote:
Tue Oct 20, 2020 2:02 pm
So for some reason trying to spawn in an npc that's outside of the section boundary only works in section 0. I wasn't really able to tell what would be causing this by looking at the code, so I'm assuming it's a redigit thing?
NPC's can only spawn in if they're in the same section as the player, and NPC's outside of any section bounds will default to section 0.
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

User avatar
55jedat555
Fighter Fly
Fighter Fly
Posts: 64
Joined: Sat Feb 28, 2015 11:35 am
Flair: flare
Contact:

Re: spawnzones.lua - Make your setups actually work

Postby 55jedat555 » Mon Oct 26, 2020 8:53 am

Well, guess that makes sense. I didn't know that.
My YouTube channel: jedat555
Check out my levels!
"Don't trust your eyes, trust mine."
Image
I support:
Spoiler: show
Image
Image
Image
Image
Image
Image


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests