Added cycle_object_animations.lsl. Also change to test.cpp to see if it affects a g++ internal compiler error.

master
Brad Payne (Vir Linden) 2017-06-30 21:59:39 +01:00
parent a09cc5f4bb
commit 2af5332e46
2 changed files with 53 additions and 2 deletions

View File

@ -34,7 +34,6 @@
*
*/
#include "linden_common.h"
#include "llerrorcontrol.h"
#include "lltut.h"
@ -685,5 +684,4 @@ int main(int argc, char **argv)
return retval;
//delete mycallback;
}

View File

@ -0,0 +1,53 @@
cycle_animations()
{
list AnimationList;
integer count = llGetInventoryNumber(INVENTORY_ANIMATION);
string ItemName;
string NowPlaying;
while (count--)
{
ItemName = llGetInventoryName(INVENTORY_ANIMATION, count);
if (NowPlaying != "")
{
llSay(0, "Stopping " + NowPlaying);
llStopObjectAnimation(NowPlaying);
}
llSay(0, "Starting " + ItemName);
llStartObjectAnimation(ItemName);
NowPlaying = ItemName;
llSleep(10);
}
if (NowPlaying != "")
{
llSay(0, "Stopping " + NowPlaying);
llStopObjectAnimation(NowPlaying);
llSleep(10);
}
}
default
{
state_entry()
{
llSay(0, "Animated Object here");
}
touch_start(integer total_number)
{
llSay(0, "Touch started.");
while (1)
{
cycle_animations();
}
}
touch_end(integer total_number)
{
llSay(0, "Touch ended.");
}
}
// Local Variables:
// shadow-file-name: "$SW_HOME/axon/scripts/testing/lsl/cycle_object_animations.lsl"
// End: