Jump to content

looking for a temple or some doors with puzzles on em


Sakairi Melodious
 Share

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

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

Recommended Posts


Racia Fiertze wrote:

perhaps even just a door with a locking script that asks a question to be open.. like a riddle

 

Try something like this, then.   Make your door with a path cut prim, B:0.125, E0.625

 

integer handle;integer my_channel;key av;string riddle = "Why did the chicken cross the road?";string answer = "to get to the other side";//nb lower case //-- 90 degrees around z axis, use - 90 to reverse directionvector vDegSwing = <0, 0, 90>;rotation vRotSwing;float vFltTmt = 10.0; // stay open for 10 secondsfloat vFltOpn;uDoor(){	llSetLocalRot( (vRotSwing = ZERO_ROTATION / vRotSwing) * llGetLocalRot() );	llSetTimerEvent( (vFltOpn = (float)(!((integer)vFltOpn)) * vFltTmt) );	//-- small hack to get around logical not with floats}default{	state_entry(){		my_channel = ((integer)("0x"+llGetSubString((string)llGetKey(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF;		vRotSwing = llEuler2Rot( vDegSwing * DEG_TO_RAD ); // convert to rotation	}	touch_start( integer vIntNull ){		av = llDetectedKey(0);		llListenRemove(handle);		handle = llListen(my_channel,"",av,"");		llSetTimerEvent(15.0);		llTextBox(av,riddle,my_channel);	}	listen(integer channel, string name, key id, string msg){		llListenRemove(handle);		llSetTimerEvent(0.0);		if(llToLower(msg)==answer){			state open;		}		else{		llRegionSayTo(id,0,"Sorry, wrong answer");		}	}	timer(){		llListenRemove(handle);		llRegionSayTo(av,0,"Sorry, timed out");		llSetTimerEvent(0.0);	}}state open{	state_entry()	{		llRegionSayTo(av,0,"Correct; you may enter");		uDoor();	}	timer(){		if (vFltOpn){			uDoor();		}	}}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4625 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...