Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
PaganRaven

Special for raising platforms in a sequence?

Recommended Posts

Hi. I kinda noticed that there's no action special for making tags move to the same floor height in a sequence (or maybe I just didn't look hard enough). You can build stairs, but that makes a difference of height between all the tags instead of putting them at the same level. You could just give all the platforms the same tag and raise the floor level, but that makes them do it synchronously, as opposed to a fashion where the next platform waits a little bit before rising after the previous one. To accomplish this in a map I had to use a script, and I would have rather just attatched a special right to the switch. Here's a little pseudocode of what I think the special should do:

/*  
	Function to make platforms that raise to the same level
	in a sequence, beginning with starttag and ending with
	endtag.  If delay time is 0, the next platform waits
	for the previous one to finish moving before rising.
*/

Plat_raiseSequence(int startTag,int endTag,int speed,int amount,int time)
{
	for (int count = startTag; count <= endTag; count++)
	{
		Floor_RaiseByValue(count,speed,amount);
		if (time > 0)
			delay(time);
		else if (time == 0)
			tagWait(count);
	}
}

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×