I also provided a small tutorial if scripts are not your thing, and you want to customize it into your level.
Tutorial
Have the editor open with the level, or this might not make sense.
- Spoiler
- First, there is one variable.
val(Health) is how much health is left the player has left. The value you set this variable will be the default amount in the level.
The first Script I will talk about is "Max Health"Code: Select all
start:
If val(health) > 8 then
val(Health)=8
End If
call sleep(1)
goto start
You can change the 8s into whatever number you want. This number is the maximum health you can have in the level. This script must be activated by an event that that heals you. In the example level there are 3 events "Health Increase X". In the variables you can determine how much each event heal. Make sure that you make an NPCs death triggers the heal, and that the events triggers the scripts Health Max.
In Events -> Level-Start -> Others -> Scripts
You can choose [Power-up, Power-up Complex, Power-up Complex 2, or Tanooki Set-up]
Power-up:Code: Select all
start:
Char(1).Status = 2
call TxtCreate(1, 0, 0,32,128,0,16,89,1,"Current Health = &val(Health)")
call sleep(1)
Goto start
By choosing this script you will have the the player have the same power-up throughout the whole level. You can change the "2" in the second line to force the player into the following states. For example, in here I have "Char(1).Status = 2" this means I will always be Super Mario in the level. If I change it to "Char(1).Status = 3" then I will be Fire Mario in the level.
List of all Power-ups that you can use
2 = Super Mario
3 = Fire Mario
4 = Racoon Mario
5 = Tanooki Mario
6 = Hammer Mario
7 = Ice Mario
8 = Frog Mario
List of all Power-ups that you could use, but there is a glitch that makes these not work.
9 = Shell Mario
10 = Propeller Mario
11 = Mini Mario
12 = Penguin Mario
DO NOT CHOOSE(with one exception)
1 = Small Mario
Power-up Complex:Code: Select all
start:
If val(Health)<> 1 then
Char(1).Status = 3
End if
If val(Health)= 1 then
Char(1).Status = 2
End if
call sleep(1)
goto start
By choosing this script you can make the player be a specific power-up in the level, but when he only has one health bar left, the player will transform into another state. For example, in this script Mario will be Fire Mario in the whole level. If he gets hurt enough and only has one bar left, he will turn into Super Mario. If he recovers Health, he will turn back into Fire-Mario. This is the only time when you can choose:
If val(Health)= 1 then
Char(1).Status = 1
Power-up Complex 2:Code: Select all
start:
If val(Health)<> 8 then
Char(1).Status = 2
End if
If val(Health)= 8 then
Char(1).Status = 3
End if
call TxtCreate(1, 0, 0,32,128,0,16,89,1,"Current Health = &val(Health)")
call sleep(1)
goto start
This script is similar to Power-up Complex, but this time one specific power-up activates when you have max health. Remember to change the 8 to whatever you set Max Health.
Tanooki Set-upCode: Select all
start:
If val(Health)> 2 then
Char(1).Status = 5
End if
If val(Health)= 2 then
Char(1).Status = 4
End if
If val(Health)= 1 then
Char(1).Status = 2
End if
call TxtCreate(1, 0, 0,32,128,0,16,89,1,"Current Health = &val(Health)")
call sleep(1)
goto start
This is a small extra. Make sure to have max health set to 3.
DOWNLOAD










