How do you make power-ups have a time limit?
Posted: 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.
Official Community of WohlSoft Team
https://wohlsoft.ru/forum/
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 OfficialJC02 wrote: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.
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
if char(1).status <> 3
char(1).status = 3
char(1).hitpoint -= 1
end if
end if
call sleep(1)
loop