[Tea-Script] Super Mario 64 Health System

Description: You made a script? Submit it here to show your creation to the public, share, take reviews, provision of the help and support is here!
Moderators: Yoshi021, Lx Xzit, 5438A38A, TepigFan101, Moderators

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 17
Reputation: 75
Posts: 623
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #1by Yoshi021 » 8 Jul 2016, 17:29

With these scripts you can make the SM64 health system. Unfortunately, it only works with Mario and Luigi

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-up

Code: 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
Last edited by Yoshi021 on 8 Jul 2016, 17:42, edited 2 times in total.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Pilzinsel64
Count
Count
Pilzinsel64
Count
Count
Reputation: 27
Posts: 219
Joined: 24 Jan 2016

Post #2by Pilzinsel64 » 8 Jul 2016, 17:37

The zip-file is empty.

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 17
Reputation: 75
Posts: 623
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #3by Yoshi021 » 8 Jul 2016, 17:42

FIXED
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

h2643 M
Contributor
Contributor
h2643 M
Contributor
Contributor
Reputation: 82
Posts: 327
Joined: 15 Feb 2014
Location: Ukraine
Skype YouTube VK

Post #4by h2643 » 8 Jul 2016, 18:05

Hey, it's like that one lua script that Prado and lotus006 have made. It's neat though!
<Knux> h2643 the super computer

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 17
Reputation: 75
Posts: 623
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #5by Yoshi021 » 8 Jul 2016, 18:25

h2643 wrote:Hey, it's like that one lua script that Prado and lotus006 have made. It's neat though!
Thanks.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

afanguy M
Citizen
Citizen
Avatar
afanguy M
Citizen
Citizen
Reputation: 0
Posts: 5
Joined: 14 Aug 2016

Post #6by afanguy » 14 Aug 2016, 2:17

Hey, I've made a few adjustmends to the Health Counter and Power-Up System. It does actually display your custom liefcounter right now.
Here's a link:
Spoiler
https://www.dropbox.com/s/gxjbu0dzm8tv2ha/Super%20Mario%20Galaxy%20Health%20Bar.rar?dl=0

It's packed with a ReadMe and stuff, because I was hoping I could release it on a different forum (I mean. If you're okay with it. Take a look at the ReadMe before you decide). I hope you like what I made out of your "Base Code" and that you'd be fine with me releasing it. I won't do it as long as I don't have an answer, so you're good to go. I just want to note that it isn't perfect, as I have never worked with the TeaScript Feature before, but it still is pretty good.
7 GRAND DAD

Push Start
1992 1

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 17
Reputation: 75
Posts: 623
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #7by Yoshi021 » 14 Aug 2016, 3:23

afanguy wrote:Hey, I've made a few adjustmends to the Health Counter and Power-Up System. It does actually display your custom liefcounter right now.
Here's a link:
Spoiler
https://www.dropbox.com/s/gxjbu0dzm8tv2ha/Super%20Mario%20Galaxy%20Health%20Bar.rar?dl=0

It's packed with a ReadMe and stuff, because I was hoping I could release it on a different forum (I mean. If you're okay with it. Take a look at the ReadMe before you decide). I hope you like what I made out of your "Base Code" and that you'd be fine with me releasing it. I won't do it as long as I don't have an answer, so you're good to go. I just want to note that it isn't perfect, as I have never worked with the TeaScript Feature before, but it still is pretty good.

Actually, I have more code that can help. I have code that imitates an oxygen bar, and toxic poison(like Super Mario 64). The reason I never released it is because I didn't know how to place images. If you want, I can give you my test level and you can script the hud images.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

afanguy M
Citizen
Citizen
Avatar
afanguy M
Citizen
Citizen
Reputation: 0
Posts: 5
Joined: 14 Aug 2016

Post #8by afanguy » 14 Aug 2016, 11:06

Yoshi021 wrote:Actually, I have more code that can help. I have code that imitates an oxygen bar, and toxic poison(like Super Mario 64). The reason I never released it is because I didn't know how to place images. If you want, I can give you my test level and you can script the hud images.

I guess I could try to script the images in. I made it work once (although it wasn't full 100% centered), so I think can make it work twice.

Also I will try to make the Health Bars Multiplayer-Compatible/Compatible with P2.
7 GRAND DAD

Push Start
1992 1

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 17
Reputation: 75
Posts: 623
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #9by Yoshi021 » 28 Aug 2016, 3:05

I made a small update that fixed a small error that made the player invincible when they got negative health values ;-)
http://www.mediafire.com/download/zky8xuy9t5bhs99/SM64_Health_System_Plus.zip
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:


Return to “Script submission”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest