LunaLua Request: Entering Combat (Earthbound)

This is the place for discussion and support for LunaLua and related modifications and libraries.
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
User avatar
Devan2002
Mega Mole
Mega Mole
Posts: 254
Joined: Sun Oct 02, 2016 9:46 am
Location: Central United States [UTC-6]
Chat Username: Devan2002

LunaLua Request: Entering Combat (Earthbound)

Postby Devan2002 » Wed Aug 01, 2018 10:15 pm

Basically, I want it like, if an enemy approaches you from behind, it sends you to a different section than if you were to approach the enemy from behind (and different if neither approach each other from behind).


To make things simple here's how it should work:

If an enemy walks in range of the player when their back is facing towards them (activate a trigger)

If an enemy walks in range of the player when their back is facing away from them, or if the player and enemy collide with each other (activate a different trigger)

If the player walks into an enemy while they're moving in the direction that is away from the player (activate a trigger different from the other 2)


After I'm done with my current project, I may work with an Earthbound project.
It's kinda sad to see that there aren't many episodes based on Link being the main protagonist. Hopefully I can see more in the future, because LoZ was one of my favorite franchises. ;)
Image

You can always give me ideas on my projects, so don't hold them in.

I am the nerd of video games. :ugeek:
What is my life: show
Image
Supported Projects: show
Image
ImageImage
I support these projects. :mrgreen:
Also, have an adorable image of Budew.
Image
Legend of Zelda X: My project: show
Image

User avatar
PixelPest
Edward
Edward
Posts: 6777
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Location: Canada, Eh?
Chat Username: PixelPest
Contact:

Re: LunaLua Request: Entering Combat (Earthbound)

Postby PixelPest » Wed Aug 01, 2018 10:28 pm

So just to be clear, you're asking someone to help you with code for a project that you haven't started and that you might only possibly do in the future?

Anyway, just in a vague sense, you basically need to check if the player's direction and the NPC's direction are the same, and then check their positions relative to each other. You can use colliders.collideNPC to determine if an NPC collides with the player object. Not sure about your level of LunaLua experience so someone else (or I) can elaborate as needed

User avatar
Devan2002
Mega Mole
Mega Mole
Posts: 254
Joined: Sun Oct 02, 2016 9:46 am
Location: Central United States [UTC-6]
Chat Username: Devan2002

Re: LunaLua Request: Entering Combat (Earthbound)

Postby Devan2002 » Wed Aug 01, 2018 10:32 pm

PixelPest wrote:
Wed Aug 01, 2018 10:28 pm
So just to be clear, you're asking someone to help you with code for a project that you haven't started and that you might only possibly do in the future?
Yeah, I had this idea just out of curiousity, and if someone had the time to do it, I'd probably make a project about it. Perhaps someone else could even use it if they really wanted an Earthbound/Mother episode in SMBX.
PixelPest wrote:Not sure about your level of LunaLua experience so someone else (or I) can elaborate as needed
I have no experience with using LunaLua, all I know is that you place it in your level folder and it works (putting the code you want in it), unless of course, something doesn't go right.
It's kinda sad to see that there aren't many episodes based on Link being the main protagonist. Hopefully I can see more in the future, because LoZ was one of my favorite franchises. ;)
Image

You can always give me ideas on my projects, so don't hold them in.

I am the nerd of video games. :ugeek:
What is my life: show
Image
Supported Projects: show
Image
ImageImage
I support these projects. :mrgreen:
Also, have an adorable image of Budew.
Image
Legend of Zelda X: My project: show
Image

User avatar
hacheipe399
Spiny
Spiny
Posts: 56
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.
Contact:

Re: LunaLua Request: Entering Combat (Earthbound)

Postby hacheipe399 » Wed Aug 08, 2018 8:39 pm

Do you have a video of the original game where the mechanic is functioning?
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
Devan2002
Mega Mole
Mega Mole
Posts: 254
Joined: Sun Oct 02, 2016 9:46 am
Location: Central United States [UTC-6]
Chat Username: Devan2002

Re: LunaLua Request: Entering Combat (Earthbound)

Postby Devan2002 » Wed Aug 08, 2018 11:41 pm

hacheipe399 wrote:
Wed Aug 08, 2018 8:39 pm
Do you have a video of the original game where the mechanic is functioning?
There is a green screen of it:


But if you want the colors:

Enemy approaches you from behind: Red
Both you and enemy collide: Blue
Player approaches enemy from behind: Green

Boss Fight: Blue

This is particularly to show what shade of red, blue, and green they are:



This sound effect plays whenever a red spiral appears:
It's kinda sad to see that there aren't many episodes based on Link being the main protagonist. Hopefully I can see more in the future, because LoZ was one of my favorite franchises. ;)
Image

You can always give me ideas on my projects, so don't hold them in.

I am the nerd of video games. :ugeek:
What is my life: show
Image
Supported Projects: show
Image
ImageImage
I support these projects. :mrgreen:
Also, have an adorable image of Budew.
Image
Legend of Zelda X: My project: show
Image

User avatar
hacheipe399
Spiny
Spiny
Posts: 56
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.
Contact:

Re: LunaLua Request: Entering Combat (Earthbound)

Postby hacheipe399 » Thu Aug 09, 2018 3:19 pm

I'm sure that something like this is better to be implemented on the world map. However, I did a little test and the main algorithm is done. It spawns koopa shells in the colour it should and play different sound effects from the game. I left commented lines if you manage to find the swirls in gif format so you can load them. Just make a level and place a SMW Blue Koopa to test with, if you want to change it to a fireflower for example, go to line 15 and change the ID in NPC.get().

Download it
Tell me if this suits you.
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
Devan2002
Mega Mole
Mega Mole
Posts: 254
Joined: Sun Oct 02, 2016 9:46 am
Location: Central United States [UTC-6]
Chat Username: Devan2002

Re: LunaLua Request: Entering Combat (Earthbound)

Postby Devan2002 » Fri Aug 10, 2018 12:50 pm

hacheipe399 wrote:
Thu Aug 09, 2018 3:19 pm
I'm sure that something like this is better to be implemented on the world map. However, I did a little test and the main algorithm is done. It spawns koopa shells in the colour it should and play different sound effects from the game. I left commented lines if you manage to find the swirls in gif format so you can load them. Just make a level and place a SMW Blue Koopa to test with, if you want to change it to a fireflower for example, go to line 15 and change the ID in NPC.get().

Download it
Tell me if this suits you.
I've never really used LunaLua, after putting the zip you posted in a test folder, and using SMBX 2.0, the level wouldn't load due to "SMBX with LunaLua is not running"
It's kinda sad to see that there aren't many episodes based on Link being the main protagonist. Hopefully I can see more in the future, because LoZ was one of my favorite franchises. ;)
Image

You can always give me ideas on my projects, so don't hold them in.

I am the nerd of video games. :ugeek:
What is my life: show
Image
Supported Projects: show
Image
ImageImage
I support these projects. :mrgreen:
Also, have an adorable image of Budew.
Image
Legend of Zelda X: My project: show
Image

User avatar
hacheipe399
Spiny
Spiny
Posts: 56
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.
Contact:

Re: LunaLua Request: Entering Combat (Earthbound)

Postby hacheipe399 » Fri Aug 10, 2018 1:04 pm

Devan2002 wrote:
Fri Aug 10, 2018 12:50 pm
I've never really used LunaLua, after putting the zip you posted in a test folder, and using SMBX 2.0, the level wouldn't load due to "SMBX with LunaLua is not running"
Strange. Make a level (for example: "Earthbound level.lvl"), and then make a folder called Earthbound level (the exact name of the lvl file). The place the lunadll.lua and the sounds inside the folder you created.
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
Devan2002
Mega Mole
Mega Mole
Posts: 254
Joined: Sun Oct 02, 2016 9:46 am
Location: Central United States [UTC-6]
Chat Username: Devan2002

Re: LunaLua Request: Entering Combat (Earthbound)

Postby Devan2002 » Fri Aug 10, 2018 1:10 pm

This is what's in my folder:
Image

Though one thing, why are the .wav files in a higher pitch sound?
It's kinda sad to see that there aren't many episodes based on Link being the main protagonist. Hopefully I can see more in the future, because LoZ was one of my favorite franchises. ;)
Image

You can always give me ideas on my projects, so don't hold them in.

I am the nerd of video games. :ugeek:
What is my life: show
Image
Supported Projects: show
Image
ImageImage
I support these projects. :mrgreen:
Also, have an adorable image of Budew.
Image
Legend of Zelda X: My project: show
Image

User avatar
hacheipe399
Spiny
Spiny
Posts: 56
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.
Contact:

Re: LunaLua Request: Entering Combat (Earthbound)

Postby hacheipe399 » Fri Aug 10, 2018 1:33 pm

Devan2002 wrote:
Fri Aug 10, 2018 1:10 pm
Though one thing, why are the .wav files in a higher pitch sound?
High pitch or high volume? I know they're very loud. In the lunadll.lua file is the code I wrote, the luna.lua file created by the editor isn't needed.
This is the structure you need:
/folder where your levels are/yourlevel.lvl
/folder where your levels are/yourlevel/lunadll.lua
/folder where your levels are/yourlevel/eb_ambush.wav
/folder where your levels are/yourlevel/eb_behind.wav
/folder where your levels are/yourlevel/eb_boss.wav
/folder where your levels are/yourlevel/any-custom-graphic.gif
The lunadll.lua and the sounds need to be where you store the custom graphics for the each level.
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
Devan2002
Mega Mole
Mega Mole
Posts: 254
Joined: Sun Oct 02, 2016 9:46 am
Location: Central United States [UTC-6]
Chat Username: Devan2002

Re: LunaLua Request: Entering Combat (Earthbound)

Postby Devan2002 » Fri Aug 10, 2018 1:39 pm

It's higher pitch.
It's kinda sad to see that there aren't many episodes based on Link being the main protagonist. Hopefully I can see more in the future, because LoZ was one of my favorite franchises. ;)
Image

You can always give me ideas on my projects, so don't hold them in.

I am the nerd of video games. :ugeek:
What is my life: show
Image
Supported Projects: show
Image
ImageImage
I support these projects. :mrgreen:
Also, have an adorable image of Budew.
Image
Legend of Zelda X: My project: show
Image


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests