How do you make power-ups have a time limit?

Description: Internal scripting system of SMBX-38A Engine based on the simple VB-like language
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

OfficialJC02 M
Topic author, Nice citizen
Nice citizen
Avatar
OfficialJC02 M
Topic author, Nice citizen
Nice citizen
Age: 17
Reputation: 3
Posts: 12
Joined: 30 May 2020
Youtube channel URL

Post #1by OfficialJC02 » 9 Oct 2020, 20:09

For example, if Mario gets the Fire Flower, he would only have it for a certain amount of time before losing it.

Victor ManuelMR M
Marquis
Marquis
Avatar
Victor ManuelMR M
Marquis
Marquis
Age: 18
Reputation: 54
Posts: 157
Joined: 7 Feb 2018

Post #2by Victor ManuelMR » 9 Oct 2020, 21:03

OfficialJC02 wrote:For example, if Mario gets the Fire Flower, he would only have it for a certain amount of time before losing it.

Code: Select all

dim timer as double

do
if char(1).status = 3 then timer += 1

if timer > 400
   char(1).status = 2
   timer = 0
end

call sleep(1)
loop
Image
[1.4.5] - Dream Team at The Challenging Portals:
Image

OfficialJC02 M
Topic author, Nice citizen
Nice citizen
Avatar
OfficialJC02 M
Topic author, Nice citizen
Nice citizen
Age: 17
Reputation: 3
Posts: 12
Joined: 30 May 2020
Youtube channel URL

Post #3by OfficialJC02 » 9 Oct 2020, 22:35

I have 2 questions:

1. How do I add music while Mario is Fire Mario? (The music from Super Mario Galaxy)
2. How do I keep Mario from losing the power-up when he gets hit but still takes damage?

I know it’s a lot to ask, but this will help me a lot with other scripts as well.


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest