Alternative implementation of "wait".
#4

You can do an easy trick with a Define

Code:
#define Wait(%0)<%1> return SetTimer("@wait_"#%1,%0,false); } \
					forward @wait_%1(); @wait_%1() {
usage:

Code:
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	print("1");
 	Wait(1000)<a>
	print("2");
	Wait(1000)<b>
	print("3");
	Wait(1000)<c>
	print("4");
	return 1;
}
I thought about a other way but i don't know if it possible to get the address of a goto label to jump to a label anywhere in your code.
Reply


Messages In This Thread
Alternative implementation of "wait". - by Emmet_ - 02.01.2014, 11:59
Re: Alternative implementation of "wait". - by Patrick - 02.01.2014, 12:07
Re: Alternative implementation of "wait". - by Emmet_ - 02.01.2014, 17:18
Re: Alternative implementation of "wait". - by IPrototypeI - 02.01.2014, 18:08
Re: Alternative implementation of "wait". - by IPrototypeI - 02.01.2014, 19:03
Re: Alternative implementation of "wait". - by Emmet_ - 02.01.2014, 19:11
Re: Alternative implementation of "wait". - by IPrototypeI - 02.01.2014, 19:22
Re: Alternative implementation of "wait". - by Emmet_ - 02.01.2014, 19:38

Forum Jump:


Users browsing this thread: 3 Guest(s)