Page 1 of 1

Script help.

Posted: October 10th, 2008, 6:33 pm
by zipperdude
okay so i have a brush that i want to go up and down. The brush is in the middle of the up/down path. I want it to go 88 units up and 115 units down. heres my script:

Code: Select all

bridge_1()
{
	bridge_1 = getent("bridge_1","targetname");
	while(1)
	{
		bridge_1 moveZ (88,2,0.5,0.5);
		bridge_1 waittill("movedone");
		bridge_1 moveZ (-115,2,0.5,0.5);
		bridge_1 waittill("movedone");
	}
}
All it does is go up 88 units then go down 115 units then back up 88. I guess what im trying to ask is how do i make it go back up 115 units?

Re: Script help.

Posted: October 10th, 2008, 8:54 pm
by Drofder2004
Or you could just put it on the top or bottom instead of planting it in the middle? :S

Re: Script help.

Posted: October 11th, 2008, 3:40 pm
by Drofder2004
Alternatively, you could just move the object THEN loop the up and down...

Re: Script help.

Posted: October 14th, 2008, 8:03 pm
by zipperdude
lol i wanted it in the middle because that way since theres 4 of them they got at different paces. but i changed it and put them all starting at either top or bottom and moving at different sppeds so there all going differently.