Advertisement
giratina1999

Untitled

Sep 6th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. why is my dialog menu not appearing?
  2.  
  3. integer Channel;
  4. key av;
  5. FindGroundOrWater()
  6. {
  7. vector vTarget = llGetPos();
  8. vTarget.z = llGround( ZERO_VECTOR );
  9. float fWaterLevel = llWater( ZERO_VECTOR );
  10. if( vTarget.z < fWaterLevel )
  11. vTarget.z = fWaterLevel;
  12. llSetRegionPos(vTarget);
  13. }
  14. default
  15. {
  16. on_rez(integer x)
  17. {
  18. Channel = (integer) ( "0x" + (string) llGetOwner() ) - 13579;
  19. llListen(Channel, "", "", "");
  20. llDialog(llDetectedOwner(0), "Select An Option", ["Surface"],Channel);
  21. }
  22. state_entry()
  23. {
  24. av = llAvatarOnSitTarget();
  25. Channel = (integer) ( "0x" + (string) llGetOwner() ) - 13579;
  26. llListen(Channel, "", "", "");
  27. llSitTarget(<0.5,0,0>, ZERO_ROTATION);
  28. }
  29. listen(integer chan, string name, key id, string msg)
  30. {
  31. if(msg == "Surface")
  32. {
  33. llSetClickAction(CLICK_ACTION_SIT);
  34. if(av)
  35. {
  36. FindGroundOrWater();
  37. llUnSit(av);
  38. llDie();
  39. }
  40. else
  41. {
  42. llOwnerSay("Touch To Teleport To Surface");
  43. }
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement