Share and discuss custom LunaLua code and content packs for SMBX2.
Moderator: Userbase Moderators
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Wed Apr 23, 2025 4:21 am
Cat king wrote: ↑Tue Apr 22, 2025 5:38 pm
Not sure if this is a bug or not, but if the setting 'Jump Over blocks' is turned on then the NPC will jump whenever it encounters slopes. This is also an issue if the setting 'Jump Over Gaps' is turned on, jumping whenever it encounters slopes.
Thanks for alerting me to this bug, I will fix it in the next update
|
|
|
|
|
|
|
|
|
-
AdvancedTrash
- Goomba

- Posts: 4
- Joined: Fri Apr 25, 2025 4:21 pm
- Pronouns: he/him
Postby AdvancedTrash » Tue Apr 29, 2025 8:53 pm
Hello! I am pretty new to SMBX2 in general, and I haven't really been having too many issues until I tried to make your script work. For whatever reason, I am getting an error whenever I try to make an NPC or even just use one of the example ones in my test levels. I have them pasted in my level folder, with the lua file in an AI folder.
Not experienced or anything, but I am using respawn rooms from this thread, I have no idea if there is some conflict here
viewtopic.php?p=400429&hilit=respawn+rooms#p400429
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Wed Apr 30, 2025 6:42 am
AdvancedTrash wrote: ↑Tue Apr 29, 2025 8:53 pm
Hello! I am pretty new to SMBX2 in general, and I haven't really been having too many issues until I tried to make your script work. For whatever reason, I am getting an error whenever I try to make an NPC or even just use one of the example ones in my test levels. I have them pasted in my level folder, with the lua file in an AI folder.
Not experienced or anything, but I am using respawn rooms from this thread, I have no idea if there is some conflict here
viewtopic.php?p=400429&hilit=respawn+rooms#p400429
Thank you for your report!
You were right about respawn rooms, that was indeed conflicting with my code.
It has been fixed hopefully, but please let me know if you still encounter any issues. I hope it's fun to use!!
Also a general note to everyone, I will be adding documentation on how to use this thing after the next major update, so stay tuned.
|
|
|
|
|
|
|
|
|
-
TheZtarLord64
- Goomba

- Posts: 1
- Joined: Mon Dec 16, 2024 5:40 pm
- Pronouns: he
Postby TheZtarLord64 » Fri May 02, 2025 1:54 am
Cool. Seems like a perfect tool to use to make funny enemies or hilarious games in general.
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Sat May 03, 2025 12:37 am
Hey everyone!
I bring you a brand new update, featuring a TON of new things you can do with it. A full changelog is listed here and in the main post, check it out!
[1.2]
* NPCs can now be set to follow line guides
* Fixed a bug where state changes could trigger on level load regardless of section
* Fixed noblockcollision being set to false when the npc loaded
* Fixed a bug where the NPC would repeatedly jump on slopes
* Added the ability to attach NPCs to redirectors
* Added a "shake" option, useful for indicating attacks or changing states
* Added the ability to fire multiple spawned npcs at once, and you can set how they spawn
* You can randomise the speed of each spawned npc!
* NPCs now act as a container, and will drop their contents on death
* NPCs have a new rotation option - the option to rotate in the air based on speed.
* You can now set NPCs to harm the player on jump per phase
* You can now set NPCs to act like a spring
* Spawned NPCs can now be set to die when the parent does
* Death effects can be handled internally, meaning you don't need a death effect if you don't want to. NPCs using this can spawn a squashed image of themselves, fall offscreen among other things!
* Sound effects and effects can be randomised like with states, and are handled better internally
* NPCs can be set to move like a Zelda 2 Bot
* A general timer that affects horizontal and vertical movement has been added. It does something different for each behaviour.
* NPCs are now affected by twisters, but you can blacklist it by removing the line "twisterai.whitelist(id)" in the AI file.
* NPCs can act as vines
* NPCs can act as coins, with a value you can set
* The UI has been improved a bit
* Paralyse code has been improved, and you can also set it to be paralysed from anything.
* NPCs can change states when colliding with the player, or any NPC.
* You can specify a starting phase for NPCs
* You can attach other NPCs to "trail" your creation. It can be set to be positioned anywhere, as well as following like a flame chomp and circling like a shield.
* You can make the NPC's animation be controlled with the state timer, rather than the usual one
* You can flip NPCs over like a galoomba
* You can set NPCs to be picked up and thrown on a per state basis
* Spawned effects can have X and Y speed
* You can now change states when entering / exiting water
* NPCs can be set to jump upon changing states
* NPCs can now be set to be affected by water physics
* NPCs can have a specific direction set when changing phases
* NPCs can now perform melee attacks, by sending out a hitbox that can be controlled, you can make them harm NPCs, blocks and even players!
* NPCs can now follow Waypoints, a separate NPC that must be linked with the NPC Creator. You can do this by giving the Waypoint an id via the extra settings, and typing that same id into the NPC Creator to refer to it.
* Effects can now be spawned anytime, and at random spots.
Added in 58 minutes 26 seconds:
[URGENT]
Please re-download! Turns out I uploaded the wrong file that didnt have all the changes. Has now been added!
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Sat May 03, 2025 10:24 pm
Released a small update, adding a new feature that lets you kill spawned npcs when you change states, and adds an optional "lite" version of the npc for those who don't like the lag in the editor.
Added in 5 hours 15 minutes 37 seconds:
Added another small update, turns out I forgot to apply the shaking code across all states.
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Mon May 05, 2025 5:58 am
Released one more small update for now, fixing a few general bugs and letting the NPC change states when in the air.
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Tue May 06, 2025 5:15 am
Fixed another small sfx bug
|
|
|
|
|
|
|
|
|
-
PROX
- Van De Graf

- Posts: 1971
- Joined: Sun Jul 06, 2014 8:50 pm
Postby PROX » Tue May 06, 2025 5:49 am
This is really well done! Very versatile! I can definitely put this to good use in the future
|
|
|
|
|
|
|
|
|
-
Thundaga_T2
- Ripper II

- Posts: 352
- Joined: Wed Jun 11, 2014 6:31 am
Postby Thundaga_T2 » Fri May 09, 2025 4:17 pm
Is there a flag to make the npc act like a block? I'd like to recreate a shy guy, but im not seeing that option. Unless i missed it.
Nevermind i found it, im just stupid lol. 
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Sun May 11, 2025 5:26 am
Added a new bugfix, fixing most notable a bug where NPCs could die twice if already being killed.
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Mon May 12, 2025 7:33 am
Released a new update!
Adds a few new things
* Rotation can now be set to face the player
* NPCs that act as a spring dont need to have a bounce animation, check the green spring example to see what I mean.
* NPCs can now change states when grabbed.
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Sun May 18, 2025 8:35 am
Released a small update, fixing a bug with redirectors.
|
|
|
|
|
|
|
|
|
-
JaximustheGreat
- Shy Guy

- Posts: 5
- Joined: Sun May 11, 2025 5:50 pm
- Pronouns: He/Him
Postby JaximustheGreat » Tue May 20, 2025 8:58 pm
Hey, sometimes my NPC disappears when I have it go to the waypoint, any reason why that might be?
|
|
|
|
|
|
|
|
|
-
MegaDood
- Charged Spiny

- Posts: 1815
- Joined: Wed Nov 01, 2017 2:43 am
Postby MegaDood » Fri May 23, 2025 3:44 am
JaximustheGreat wrote: ↑Tue May 20, 2025 8:58 pm
Hey, sometimes my NPC disappears when I have it go to the waypoint, any reason why that might be?
I might have fixed that in a recent update and forgotten to mention it, could you try downloading the npc creator again and seeing if it works? Also does it only disappear when teleporting or when going to it some other way?
One other thing to note is when teleporting or moving to a waypoint you need to set the displayed frames for it, which are in the general frame settings
|
|
|
|
|
|
|
|
|
-
RadMetalMarioSMIX
- Swooper

- Posts: 75
- Joined: Sat Mar 14, 2015 6:42 pm
- Flair: What kind of grave is this?
- Pronouns: he/him
Postby RadMetalMarioSMIX » Thu May 29, 2025 6:26 am
I'm trying to make some Metroid Doors but I'm having trouble getting them to activate. Also can you make power-ups with this?
Last edited by MrDoubleA on Fri May 30, 2025 7:09 am, edited 1 time in total.
Reason: Removed quote of the original post.
|
|
|
|
|
|
|
|
|
-
yoshibro75
- Cheep-Cheep

- Posts: 11
- Joined: Tue Jun 25, 2024 8:34 pm
- Pronouns: he/him
Postby yoshibro75 » Sat May 31, 2025 10:02 am
Holy peak.
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 2 guests
|