Scripts won't change to Mario Status >8

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 191
Posts: 476
Joined: 9 Nov 2015
Website

Post #1by Lx Xzit » 7 Jul 2016, 20:03

I noticed there are some problems with status forms. For example, if you want Mario be giant the follow code will work:

Code: Select all

Char(1).Status=2


But if you want Mario to be a status >8 (Shell Mario, Propeller Mario, Mini Mario or Penguin Mario) it won't work.
For example, if you add this code:

Code: Select all

Char(1).Status=9


It should change the status to Shell Mario, but it won't work, it will change the status to Frog Mario (a.k.a status 8). This happen only in the status 9, 10, 11 and 12, everytime you try to use them it will stuck at status 8.

I mean, the engine itself is able to know all the transformations and you can use them to make conditional scripts, but it won't change the status correctly.

Sorry if I didn't explain this correctly, I made a test level to you know what I'm talking about.

In this level, Mario should change his status between numbers 8-12 every second (1st second: Frog Mario, 2nd second: Shell Mario, and so on) but you will notice the player will always stuck at Frog Mario, but this works fine in status <9. :P

Yoshi021: Bug fixed
Tested using SMBX 1.4.2 (Patch 5)
Attachments
Power-ups Problem.lvl
(3.52 KiB) Downloaded 41 times
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server! CLICK HERE

Yoshi021 M
Moderator
Moderator
Avatar
Yoshi021 M
Moderator
Moderator
Age: 18
Reputation: 113
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #2by Yoshi021 » 7 Jul 2016, 22:37

Okay, I noticed a few things,
If you simply put the script
Char(1).Status=
You can easily force a power-up state and its suppose to match the power-up in the graphic folder. This means you can't use this script to make a character Mega. Also, if you put 0 or a negative number you will turn into small mario. If you put a decimal, the game will round the decimal.
Unfortunetly, it seems the engine just doesn't register those values.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:


Return to “Troubleshooting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest