Direction button.lsl 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // :SHOW:1
  2. // :CATEGORY:NPC
  3. // :NAME:HyperGrid Story Nine
  4. // :AUTHOR:Ferd Frederix
  5. // :KEYWORDS:NPC, controller, console
  6. // :CREATED:2015-11-24 20:25:33
  7. // :EDITED:2015-11-24 19:25:33
  8. // :ID:1087
  9. // :NUM:1839
  10. // :REV:1.0
  11. // :WORLD:OpenSim
  12. // :DESCRIPTION:
  13. // NPC console controller button script
  14. // Goes into 8 buttons in a compass rose configuration
  15. // Controls a pair of NPCS to xap 6 othert NPCs.
  16. // each button gets a different config.
  17. // :CODE:
  18. string E = "<1,0,0>";
  19. string NE = "<1,1,>";
  20. string N = "<0,1,0>";
  21. string NW = "<-1,1,0>";
  22. string W = "<-1,0,0>";
  23. string SW = "<-1,-1,0>";
  24. string S = "<0,-1,0>";
  25. string SE = "<1,-1,0>";
  26. // chose a direction for one of 8 buttons.
  27. default
  28. {
  29. touch_start(integer total_number)
  30. {
  31. llSetLinkPrimitiveParamsFast(llGetLinkNumber(),[PRIM_FULLBRIGHT, ALL_SIDES,TRUE]);
  32. llMessageLinked(LINK_SET,4,S,"");
  33. llSetTimerEvent(0.5);
  34. }
  35. timer()
  36. {
  37. llSetLinkPrimitiveParamsFast(llGetLinkNumber(),[PRIM_FULLBRIGHT,ALL_SIDES, FALSE]);
  38. llSetTimerEvent(0);
  39. }
  40. }