spawnzones.lua - Make your setups actually work

Share and discuss custom LunaLua code and content packs for SMBX2.
Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9737
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: spawnzones.lua - Make your setups actually work

Postby Emral » 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.

MrDoubleA
Flurry
Flurry
Posts: 386
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

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?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9737
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: spawnzones.lua - Make your setups actually work

Postby Emral » 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.

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.

55jedat555
Dolphin
Dolphin
Posts: 87
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?

MrDoubleA
Flurry
Flurry
Posts: 386
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

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.

55jedat555
Dolphin
Dolphin
Posts: 87
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.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari