Page 1 of 1

[Tea-Script] SMB3 Power-up System

Posted: 7 Jul 2016, 15:26
by Super Mario Player
I've finally got it to work; here's a script that lets you use the SMB3 system instead of the SMB1 one (if you dunno the difference, see this topic I've made).
Thanks to rotom407 for their support!

Here's the script:

Code: Select all

if Char(1).Status > 2 and Char(1).Status <> 11 then
v(a)=0
Do
Char(1).Status=2
call sleep(1)
v(a)=v(a)+1
Loop Until v(a)>20
end if


Attached a test level:
smb3_powerup.lvl
(3.65 KiB) Downloaded 393 times


To use it for your custom level, you must:
1- Create a new variable called "a";
2- Create a new script called "Hit" and copy/paste the code above in that script;
3- Create a new event called "Player - GotHurt" (the name must be this exact name) and click Others -> Scripts and there select the script "Hit".

Hope it'll be useful! :)

Posted: 7 Jul 2016, 20:27
by Lx Xzit
This is pretty interesting! I tried to do some minor modifications to the Script because here are some missing frames:
Spoiler
Image

I did the same for all the power-ups (except for mini-mushroom of course :P) BUT there's a weird problem at statuses >8, look at this:
Spoiler
Image

I've looked at the script at least 3 times and seems everything it's fine, I guess it's a bug of the game (I reported it here anyway).

This is the script if anyone is interested:

Code: Select all

'Fire Mario
if Char(1).Status > 2 and Char(1).Status = 3 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=3
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Leaf Mario
if Char(1).Status > 2 and Char(1).Status = 4 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=4
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Tanooki Mario
if Char(1).Status > 2 and Char(1).Status = 5 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=5
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Hammer Mario
if Char(1).Status > 2 and Char(1).Status = 6 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=6
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Ice Mario
if Char(1).Status > 2 and Char(1).Status = 7 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=7
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Frog Mario
if Char(1).Status > 2 and Char(1).Status = 8 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=8
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Shell Mario
if Char(1).Status > 2 and Char(1).Status = 9 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=9
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Propeller Mario
if Char(1).Status > 2 and Char(1).Status = 10 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=10
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Penguin Mario
if Char(1).Status > 2 and Char(1).Status = 12 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=12
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

Posted: 8 Jul 2016, 0:17
by Super Mario Player
I've noticed that too, when I tried to create a script that turns Mario into one particular form, and for statuses from 1 to 8 everything's fine, but for statuses from 9 to 12, Mario turns into Frog Mario instead of the form he's intended to take.
BTW, this glitch doesn't occur with the original script (the one with the missing frames), as these frames were - I believe, as rotom407 helped me a lot for this script - intentionally skipped to avoid the said animation glitch. I'll post that in the "Troubleshooting" section!
EDIT: It was already reported...
BTW I tested your script but it doesn't seem to work for me :/
Ignore what I said, I didn't copy/paste it for all power-ups

Posted: 8 Jul 2016, 6:12
by Lx Xzit
Okay I've made a little update (I don't know if I should make a new topic of this...)
Here's the code, now it works for Luigi too and I changed the name of the variables to "Mario" and "Luigi" (due "a" and "b" variables are the most used, I thought would be better use the variables with the name of the character, so that people can use this on their episodes easier).

I also removed the animation effects for statuses 9, 10 and 12, just like in the original Script you've posted. :>

Here's the code:

Code: Select all

'MAAAAAAARIO
'Fire Mario
if Char(1).Status > 2 and Char(1).Status = 3 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=3
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Leaf Mario
if Char(1).Status > 2 and Char(1).Status = 4 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=4
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Tanooki Mario
if Char(1).Status > 2 and Char(1).Status = 5 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=5
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Hammer Mario
if Char(1).Status > 2 and Char(1).Status = 6 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=6
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Ice Mario
if Char(1).Status > 2 and Char(1).Status = 7 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=7
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Frog Mario
if Char(1).Status > 2 and Char(1).Status = 8 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=8
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Shell Mario
if Char(1).Status > 2 and Char(1).Status = 9 then
v(Mario)=0
Do
Char(1).Status=2
call sleep(1)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Propeller Mario
if Char(1).Status > 2 and Char(1).Status = 10 then
v(Mario)=0
Do
Char(1).Status=2
call sleep(1)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Penguin Mario
if Char(1).Status > 2 and Char(1).Status = 12 then
v(Mario)=0
Do
Char(1).Status=2
call sleep(1)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

' LUIGIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
'Fire Luigi
if Char(2).Status > 2 and Char(2).Status = 3 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=3
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Leaf Luigi
if Char(2).Status > 2 and Char(2).Status = 4 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=4
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Tanooki Luigi
if Char(2).Status > 2 and Char(2).Status = 5 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=5
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Hammer Luigi
if Char(2).Status > 2 and Char(2).Status = 6 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=6
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Ice Luigi
if Char(2).Status > 2 and Char(2).Status = 7 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=7
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Frog Luigi
if Char(2).Status > 2 and Char(2).Status = 8 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=8
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Shell Luigi
if Char(2).Status > 2 and Char(2).Status = 9 then
v(Luigi)=0
Do
Char(2).Status=2
call sleep(1)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Propeller Luigi
if Char(2).Status > 2 and Char(2).Status = 10 then
v(Luigi)=0
Do
Char(2).Status=2
call sleep(1)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Penguin Luigi
if Char(2).Status > 2 and Char(2).Status = 12 then
v(Luigi)=0
Do
Char(2).Status=2
call sleep(1)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if


And here's an example level (basically the same you uploaded but with other variables):
smb3_powerup.lvl
(8.94 KiB) Downloaded 269 times

Posted: 8 Jul 2016, 15:50
by Super Mario Player
I tested it and it looks good :good: you can make a new thread if you want

Posted: 9 Jul 2016, 10:04
by TheCreator520
Not so complicated , just use this :

Code: Select all

Check1:
If char(1).Status > 2 Then
Check2:
If char(1).Status <= 2 Then
char(1).Status = 2
Else
Call sleep(1)
Goto Check2
End if
Elseif char(1).Status = 2 Then
End if
Call sleep(1)
Goto Check1

Posted: 9 Jul 2016, 14:13
by rotom407
Let's make it even simpler. It's getting tricky now...
(executed when the player gets hurt)

Code: Select all

If char(1).Status > 2 Then
 Do
  If char(1).Status <= 2 Then
   char(1).Status = 2
   Exit Do
  End If
  Call sleep(1)
 Loop
End If

Posted: 9 Jul 2016, 17:20
by Super Mario Player
Thanks, I think your scripts are better than mine; I may use it in my episode. :good:

Posted: 9 Jul 2016, 22:53
by Lx Xzit
rotom407 wrote:Let's make it even simpler. It's getting tricky now...
(executed when the player gets hurt)

Code: Select all

If char(1).Status > 2 Then
 Do
  If char(1).Status <= 2 Then
   char(1).Status = 2
   Exit Do
  End If
  Call sleep(1)
 Loop
End If

Oh that's much better! By the way. I wonder if there's a way to remove the extra mushroom that appears on the item box. when you're Super Mario and become Fire Mario you'll have a mushroom in the item box plus the mushroom you have when you get hurt, there's a double mushroom, what makes the game be unfairly easy. Is there a way to remove this when it happen?

Posted: 9 Jul 2016, 23:29
by Super Mario Player
Use Char(1).Itemrsrv to set what is in the player's item box
Edit: BTW, the value to assign to Char(1).Itemrsrv is the ID of the NPC to put in the item box, e.g. if you wanna put a Mushroom in the player's item box, assign it the value 9. The cool thing is that it also lets you put any NPC in their item box (although I think there's no point in putting a SMB3 Bowser in their item box, but the fact that it might be funny). Assign it the value 0 to delete whatever the player has in their item box.

Posted: 17 Jul 2016, 9:19
by Lx Xzit
Thanks for the tip! I will try it.

Posted: 9 Oct 2016, 9:41
by Shadowblitz16
@Super Mario Player

Bug: In 2 player, Link loses his power up if Toad is hit while Link is in fairy mode.
I'm sure it happens in other scenarios but that's the characters I was using.

Posted: 9 Oct 2016, 18:51
by Super Mario Player
Shadowblitz16 wrote:@Super Mario Player

Bug: In 2 player, Link loses his power up if Toad is hit while Link is in fairy mode.
I'm sure it happens in other scenarios but that's the characters I was using.
Okay, did you use my script, or this of Lx Xzit, TheCreator520 or rotom407?

Posted: 9 Oct 2016, 22:52
by Shadowblitz16
@Super Mario Player
I uses Lx Xzit's from the post at 7 Jul 2016, 20:12

Posted: 9 Oct 2016, 23:27
by Super Mario Player
Shadowblitz16 wrote:@Super Mario Player
I uses Lx Xzit's from the post at 7 Jul 2016, 20:12
Try to use the built-in SMB3 Power-up system (Since the release of SMBX 1.4.3, it is now possible to set the power-up system to SMB3 via Events -> Others -> Special Events, then scroll down to find the SMB3 power-up system)

Posted: 10 Oct 2016, 1:20
by Shadowblitz16
wow didn't know that thanks

Posted: 1 Dec 2016, 2:36
by Toastbunny
We no longer need this script,because 38A made a SMB3 powerup system in SMBX 1.4.3.
:tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux:

Posted: 1 Dec 2016, 9:33
by Super Mario Player
Toy Bonnie wrote:We no longer need this script,because 38A made a SMB3 powerup system in SMBX 1.4.3.
:tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux:
Absolutely.