Mystic Software Forums

Miscellaneous => Archives => Archive => Topic started by: Schrinzo on December 23, 2003, 04:11:58 PM

Title: (no subject)
Post by: Schrinzo on December 23, 2003, 04:11:58 PM
Damn :angry:  I tried to make a timer but it doesn't want to work. Made one with #Delay, one with a plugin and some other stupid things but nothing want to work. In the shack isn't a good one too  Sad  
Could someone please help me?
Title: (no subject)
Post by: DarkElite on December 23, 2003, 05:23:40 PM
what kind of a timer are you trying to make? if you want one with only seconds it's extremely easy, just do something like this (not exactly though, it may have a few errors from multitasking and such  Wink )


Code: [Select]
:recalc
#Delay(1)
#seconds!=seconds!+1
#Branch (:recalc)

but for a timer with seconds, minutes, hours, and days, you have to include a bit more, like this...

Code: [Select]
:recalc
#Delay(1)
#seconds!=seconds!+1
#If (seconds!=60)
{
#minutes!=minutes!+1
#seconds!=0)
}
#If (minutes!=60)
{
#hours!=hours!+1
#minutes!=0
}
#If (hours!=24)
{
#days!=days!+1
#hours!=0
}
#Branch (:recalc)


remember, you can always change the delay time if you dont want the game time to be real time  Smile
Title: (no subject)
Post by: Schrinzo on December 24, 2003, 09:55:07 AM
I made this kind of stuff but because of the delay-thing it's getting stuck.
It is made for seconds. It's made for a minigame where you got 50 seconds to collect the stuff so you need to walk at the same time as the timer goes. This is the code I made:

#Method Timer(sec!,lose$)
{
:timer
#Delay(1)
tl!+1
#If(tl!==sec!)
{
#Run(lose$)
#End()
}
#Branch(:timer)
}

That was the timer. It didn't work if I just let the program run alone (you couldn't walk) so I set it in an item. But even then it didn't work :angry: After that I made something with
#wait(c$)
#If(c$=="LEFT") {#Push("W")}
ec.
Only now it give a new character what's under something and it make the screen black where it is. I don't know the problem..... :unsure:
Title: (no subject)
Post by: DarkElite on December 24, 2003, 10:06:10 AM
hmmm... its that damn multitasking crap.... i'd ask xorlak or cesque about that stuff, they're well experienced and always help  Razz
Title: (no subject)
Post by: DarkElite on December 30, 2003, 07:31:03 PM
i just made my own game time program.. like the one in moonews's method pack.. moonews's, it said you could set the program as an items multitasking program and just put it on the board you want to be affected by time...but it wouldnt work!!! does anyone no whats wrong!??!?
Title: (no subject)
Post by: DarkElite on December 31, 2003, 01:08:11 PM
its wintermoon's method pack, srry  <_<