Is there a way to reset state when entering a room?

Description: Have idea for a script, but you can't make it? Post it here!
Moderators: Lx Xzit, Yoshi021, 5438A38A, Semi-moderatos, Moderators

HeroicKyle75
Topic author, Honourable citizen
Honourable citizen
HeroicKyle75
Topic author, Honourable citizen
Honourable citizen
Reputation: 18
Posts: 39
Joined: 21 Oct 2018

Post #1by HeroicKyle75 » 2 Jan 2021, 14:30

I'm currently creating a level that's similar to World 8-fortress in SMB3 where you will be back and forth between two sections/rooms and which is a labyrinth-like journey to the boss room.

Is there a way in which the exact state of a section will be reset once Mario enters a room. E.g. I pick up a ? block and get a flower power, and then I enter one room and lost that power so I have to go back to the previous section to get the same flower power again from the same ? block.

NESTED ERNEST M
Count
Count
Avatar
NESTED ERNEST M
Count
Count
Reputation: 71
Posts: 268
Joined: 23 Sep 2017
Location: Perú, Lima
Youtube channel URL

Post #2by NESTED ERNEST » 28 Jul 2021, 23:07

1) Name the block as bloque1
2) At the warp that enters that room (on event enter) put the script:

Code: Select all

block(getidbyname("bloque1")).advset=1014
block(getidbyname("bloque1")).id=5
Programming NPCs in SMBX-38A is fun:
That is me
Image
Image
Image
Image

Special image
  • yt-image-banner: https://yt3.ggpht.com/M_O1AzQEOJogSq5OJESIaA5kFLdbwdDNMihDOJkJgPiH7cOx-LWK41TU9GWzExmkmpn3EWYbJg=w1060-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj
  • image-to-up: https://3.bp.blogspot.com/-Y-LrpIS2rqw/UCBTtk7k-pI/AAAAAAAABBs/qZuI0sCStkc/s1600/jean-baptiste+beaudelle+girafe++escargot.jpg
  • image-to-left: https://us.123rf.com/450wm/trassnick/trassnick2007/trassnick200700002/152919781-el-marl%C3%ADn-negro-grande-salta-del-mar-pesca-extrema-del-pez-espada-negro-en-alta-mar-vacaciones-en-lo.jpg
  • image-last-w: 1


ROCKMAN GIF IN SMBX 38A

Image


Return to “Script requests”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest