Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Epyo

Random walls and all that jazz

Recommended Posts

Ok, so, in my new pacman map, there's a blank grid, but walls will randomly popup and down every few seconds. I got the horizontal walls tagged 11-39 and the vertical walls are tagged 40-69. But my script doesn't work, this is my first time working with random stuffage.

//RANDOM WALL SCRIPT!!!!! WHEEEEEE

Script 129 OPEN
{
	int xwall;
	int ywall;
	
	xwall = random(11, 39); //these are the horizontal walls
	ywall = random(40, 69); //these are the vertical walls
	
	Floor_RaiseInstant ("i: xwall", 0, 112);
	Floor_RaiseInstant ("i: ywall", 0, 112);
	delay(70);
	Floor_lowerInstant ("i: xwall", 0, 112);
	Floor_lowerInstant ("i: ywall", 0, 112);
	
	restart;
}
I think the quotation mark things are messed up, I just played with them until I stopped getting errors.

Share this post


Link to post
Epyo said:

	// bla

	Floor_RaiseInstant ("i: xwall", 0, 112);
	Floor_RaiseInstant ("i: ywall", 0, 112);
	delay(70);
	Floor_lowerInstant ("i: xwall", 0, 112);
	Floor_lowerInstant ("i: ywall", 0, 112);

      // bla


make that

	// bla

	Floor_RaiseInstant (xwall, 0, 112);
	Floor_RaiseInstant (ywall, 0, 112);
	delay(70);
	Floor_lowerInstant (xwall, 0, 112);
	Floor_lowerInstant (ywall, 0, 112);

      // bla

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
Sign in to follow this  
×