Mystic Software Forums
Miscellaneous => Archives => Archive => Topic started 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?
-
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 )
: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...
: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
-
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:
-
hmmm... its that damn multitasking crap.... i'd ask xorlak or cesque about that stuff, they're well experienced and always help Razz
-
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!??!?
-
its wintermoon's method pack, srry <_<