Jump to content

Door Script


rab2033
 Share

You are about to reply to a thread that has been inactive for 3153 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

hi all! In LSLEditor it is working but in the game not

why?

the code:

 

default
{
	touch_start(integer total_number)
	{
		rotation rot = llGetLocalRot();

		if(rot.z == 0 )
		{
			rot.z = -0.707107;
			rot.s = -0.707107;
		}
		else
		{
			rot.z = 0;
			rot.s = 1;
		}

		llSetLocalRot(rot);
		llSetTimerEvent(5.0);
	}
	timer()
	{
		rotation rot = llGetLocalRot();
		if(rot.z == 0 )
		{
			rot.z = -0.707107;
			rot.s = -0.707107;
		}
		else
		{
			rot.z = 0;
			rot.s = 1;
		}
		llSetLocalRot(rot);
		llSetTimerEvent(0);
	}
}

 

--||-
Link to comment
Share on other sites

It works fine when I try it. Are you sure you aren't missing what is happening becuase you're putting it in a cube with equal X and Y dimensions and missing the actual change?

 

It's an interesting method which I haven't seen before. The main drawback I can see is that it can only work for an object which is aligned along the normal (rotation = 0,0,0)

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3153 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...