Sign in to follow this  
Followers 0
Jumpy

Script help

5 posts in this topic

How do I move 3 brushes at the same time? Not like on after another but so when I activate the trigger all 3 brushes would rotateYaw?

Thank you :D

 
 
 
0

Share this post


Link to post
Share on other sites

You would make the brushes and then select all the brushes that you want to rotate and give them the same targetname/value.

0

Share this post


Link to post
Share on other sites

You would make the brushes and then select all the brushes that you want to rotate and give them the same targetname/value.

No. I have 3 brushes with 3 different targetnames. I want each and one of them rotate at the same time when a trigger is activated. I don't want them to rotate as one brush :D

0

Share this post


Link to post
Share on other sites

Ah my bad I misunderstood. You can do something as simple as this: 

trap()
{
     trigger = getEnt("trigger","targetname"); 
     brush1 = getEnt("brush1","targetname");
     brush2 = getEnt("brush2","targetname");
     brush3 = getEnt("brush3","targetname");
     trigger waittill("trigger");
     trigger delete();
 
     while(1)
     {
        brush1 rotateYaw(360,1);
        brush2 rotateYaw(360,1);
        brush3 rotateYaw(360,1);
        wait 1;
     }
}
      

So brush1, brush2, and brush3 would be the 3 brushes with the 3 different targetnames. Was this something you were looking for? 

0

Share this post


Link to post
Share on other sites

Give them all the same targetname, define them in an array, boom easy.

trap()
{
	brush = GetEntArray("brushname","targetname");
	for( index = 0 ; index < brush.size ; index++ )
	{
		// Put a while loop here if you want it to loop
		brush[index] RotateYaw(360,5);
	}
}
1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0