Skip to content

Instantly share code, notes, and snippets.

@antonyfairport
Created June 16, 2016 14:49
Show Gist options
  • Select an option

  • Save antonyfairport/9c5690a8e88961bc0de6924fe6e8831f to your computer and use it in GitHub Desktop.

Select an option

Save antonyfairport/9c5690a8e88961bc0de6924fe6e8831f to your computer and use it in GitHub Desktop.
integer g_iCount;
integer g_iListen;
NextDialog()
{
g_iCount++;
llListenRemove( g_iListen );
g_iListen = llListen( -23, "", "", "" );
llDialog( llGetOwner(), "PRESS ME NOW!!!!!", [ "PRESS ME " + (string) g_iCount ], -23 );
}
default
{
touch_end(integer total_number)
{
state DialogTest;
}
}
state DialogTest
{
state_entry()
{
g_iCount = 0;
NextDialog();
}
listen( integer channel, string name, key id, string message )
{
if ( channel == -23 )
{
llSay( 0, "Got click " + ( (string) g_iCount ) + " as " + message );
if ( g_iCount > 9 )
{
state default;
}
NextDialog();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment