Attach to Layer - Larry Shell/SMB3 Bowser Issue

Need help with any SMBX game-related issues? Ask your questions here.
User avatar
FanofSMBX
Mouser
Mouser
Posts: 3875
Joined: Sun Dec 22, 2013 12:01 pm

Attach to Layer - Larry Shell/SMB3 Bowser Issue

Postby FanofSMBX » Tue Mar 31, 2020 12:09 am

Hello, I am trying to do it so that

1. A moving enemy (Goomba) is attached to a coin layer to make it move
2. The coin layer is attached to a shell layer. Once the coin dies, it will show the shell layer which should be moving with the coin

I would think that the shell would spawn where the Goomba is because the Goomba is supposed to move the coin layer, which is supposed to move the shell layer. But it doesn't. The shell just spawns at the initial place where I put it in the level. Can I do anything to fix this? Note that I am using the coin to fake a "stomp hitbox" for SMB3 Bowser, so I cannot just have the SMB3 Bowser have a Death Event. The Death Event/attached layer probably needs to be on the coin.

Note: Please ignore the many unused layers and events in the level. The only ones relevant right now are Bowser1 and Shell1. I have also used a Goomba for testing simplicity but it will be replaced with Bowser later.

https://www.sendspace.com/file/hlsqrm

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
My graphics pack!
Supporting forums:

Spoiler: show
SMBX Galaxy forum by Pivot40Channel
http://smbxgalaxy.prophpbb.com/
Come to the SMBX+ forums by illias3000. There is a whole forum category dedicated to the boss rush series with official rushes, submit bosses, and fan boss rushes! It is still open but AirSeus Forums is now open:
http://nsmbx.prophpbb.com/
AirSeus Forums the new home of the Boss Rush series:
http://smbxairseusforums.prophpbb.com/
Spoiler: show
First to discover:
Spark
Eerie
Grinder
Rainbow Shell
Birdo
Boom Boom
Image
Image
Image
Image
Image
KINGBOWSER112 RULES!


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

Re: Attach to Layer - Larry Shell/SMB3 Bowser Issue

Postby Enjl » Tue Mar 31, 2020 2:30 am

The coin never has speed. The goomba is the only thing that moves, so the shell needs to be moved by the goomba. The simplest solution I can think of is to not use events and layers and just call NPC.spawn(shell id, x coordinate, y coordinate, section) using the x and y coordinates of the goomba, and also to stop doing this hacky thing and detect bounces using Colliders.bounce(a, b) where a is the player and b is bowser.
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.

Mirror of all my content and collaborations on IPFS: QmZKzVJAsD6dE2tTHEb58XEmsNLzrW2MVsTtW7HWLAAcCC

User avatar
FanofSMBX
Mouser
Mouser
Posts: 3875
Joined: Sun Dec 22, 2013 12:01 pm

Re: Attach to Layer - Larry Shell/SMB3 Bowser Issue

Postby FanofSMBX » Thu Apr 02, 2020 5:35 am

Enjl wrote:
Tue Mar 31, 2020 2:30 am
The coin never has speed. The goomba is the only thing that moves, so the shell needs to be moved by the goomba. The simplest solution I can think of is to not use events and layers and just call NPC.spawn(shell id, x coordinate, y coordinate, section) using the x and y coordinates of the goomba, and also to stop doing this hacky thing and detect bounces using Colliders.bounce(a, b) where a is the player and b is bowser.
Oh ok, I just forwarded this to Erik. The reason I tried doing it in 1.3 was
1. I never thought to ask Erik (the user I tried to solve this problem for) what version of SMBX they were using so I looked for a system-agnostic solution
2. I looked for a scriptless solution since I liked Erik's idea enough to put it in a future episode of mine, and since that episode would use TheXTech and no support for any sort of scripting has been added to that version.

I believe in Jesus Christ as my Lord and Savior. If you do, put this in your signature.
My graphics pack!
Supporting forums:

Spoiler: show
SMBX Galaxy forum by Pivot40Channel
http://smbxgalaxy.prophpbb.com/
Come to the SMBX+ forums by illias3000. There is a whole forum category dedicated to the boss rush series with official rushes, submit bosses, and fan boss rushes! It is still open but AirSeus Forums is now open:
http://nsmbx.prophpbb.com/
AirSeus Forums the new home of the Boss Rush series:
http://smbxairseusforums.prophpbb.com/
Spoiler: show
First to discover:
Spark
Eerie
Grinder
Rainbow Shell
Birdo
Boom Boom
Image
Image
Image
Image
Image
KINGBOWSER112 RULES!



Return to “Help and Support”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests