Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Creating a Waitframe timer.

2 replies · 1,747 views · Started 01 January 2010

I was wondering if there was (and I'm very confident there is) any specific way your really expected to make something for a frame countdown. I've looked at a couple of scripts and have seen something like counter-- and stuff like that, but I couldn't figure it out. To work around that, I used a Random Number.

ffc script Norfair_Room {
void run() {
while(true) {
if (!Link -> Item[17] && (Rand(60) == 30)) { //BAM! There it is.
Link -> HP = Link -> HP - 4;
}
Waitframe();
}
}
}

But I just wanted to kow what the real way to countdown time was. When I tried waitframes(); I would always get a bunch of compiler errors that I didn't feel like trying to figure out, and I couldn't undertstand the counter-- method, so yeah.

That's not a timer at all...

All of the in-built functions and those contained within std.zh are capitalised (apart from one that I can think of), so the correct function to call is 'Waitframes();'. Make sure to also ' import "std.zh" ', as Waitframes() is defined in the header file.

ffc script Norfair_Room {
void run() {
while(!Link->Item[17]) {
Waitframes(30);
Link->HP -= 4;
}
}
}

Joe123 wrote:That's not a timer at all...

Yeah, I knew that, pretty much why I made the post in the first place. I might have been getting the errors because I didn't import std.zh. Thanks a ton.