Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Pages: 1 [2]  All

Author Topic: Cell phone  (Read 19462 times)

0 Members and 1 Guest are viewing this topic.

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Cell phone
« Reply #15 on: August 29, 2007, 07:57:48 AM »

Can you post the updated phone script?
Logged
... delete the inner sleep ...

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Cell phone
« Reply #16 on: August 29, 2007, 03:54:17 PM »

Sure thing - here you go:

Code: WME Script
  1. #include "scripts\base.inc"
  2. #include "scripts\keys.inc"
  3.  
  4. global Name3Calling;
  5.  
  6. var NumLines = 7;
  7.  
  8. var CurrentMode = ""; // none, number, contact, sms, menu, singlesms
  9. var SelectedItem = 0;
  10. var CurrentItems;
  11. var ScrollOffset = 0;
  12. var CurrentNumber = "";
  13.  
  14. var MenuOn = false;
  15.  
  16. var MenuItems;
  17. var NumberItems;
  18. var SmsItems;
  19.  
  20. var CurrentSms;
  21. var CurrentContact;
  22.  
  23. var CallCancelled = false;
  24.  
  25. var RingCounter = 0;
  26.  
  27. //these controls the visibility of the entity containers which contain the "mode" background images
  28. var ContactsBackground = this.GetControl("contacts_background");
  29. var NumberBackground = this.GetControl("number_background");
  30. var MessagesBackground = this.GetControl("messages_background");
  31. var SingleMessageBackground = this.GetControl("single_message_background");
  32. var ContactInfoBackground = this.GetControl("contact_info_background");
  33. var InCallBackground = this.GetControl("in_call_background");
  34. var IncomingCallBackground = this.GetControl("incoming_call_background");
  35. var CallCancellingBackground = this.GetControl("call_cancelling_background");
  36. var MenuBackground = this.GetControl("menu_background");
  37.  
  38.  
  39. // define main menu
  40. AddMenu("Address book");
  41. AddMenu("Text messages");
  42.  
  43. // define address book
  44. AddNumber("Home", "123456789", "home");
  45. AddNumber("Mom", "0987654321", "mom");
  46. AddNumber("Name3", "988609099", "name3");
  47. AddNumber("Name4", "349386743", "name4");
  48.  
  49. // define SMS
  50. AddSms("Mom", "Hi there, come", "visit me sometime,", "would you?");
  51. AddSms("Name3", "Hi there. I'm 3, Name 3. Fear me!!!");
  52.  
  53. //what to do when the phone is ringing
  54. if(Name3Calling==1) //controls which conversation to have when we accept the call
  55.  {
  56.   ClearDisplay();
  57.   SetMode("incoming_call");
  58.   SetLine(3, "Incoming call...", false, true);
  59.   SetLine(4, "Name3", false, true);
  60.  }
  61.  else SetMode("none");
  62.  
  63. ////////////////////////////////////////////////////////////////////////////////
  64. on "Keypress"
  65. {
  66.         if(Keyboard.KeyCode==VK_ESCAPE) this.Close();
  67.        
  68.         var Btn = null;
  69.         Btn = this.GetControl(Keyboard.Key);
  70.         if(Btn==null)
  71.         {
  72.                 if(Keyboard.KeyCode==VK_RETURN) Btn = this.GetControl("action");
  73.                 else if(Keyboard.KeyCode==VK_BACK) Btn = this.GetControl("cancel");
  74.                 else if(Keyboard.KeyCode==VK_UP) Btn = this.GetControl("up");
  75.                 else if(Keyboard.KeyCode==VK_DOWN) Btn = this.GetControl("down");
  76.         }
  77.         if(Btn!=null) Btn.Press();
  78. }
  79.  
  80. on "0" OnKey("0");
  81. on "1" OnKey("1");
  82. on "2" OnKey("2");
  83. on "3" OnKey("3");
  84. on "4" OnKey("4");
  85. on "5" OnKey("5");
  86. on "6" OnKey("6");
  87. on "7" OnKey("7");
  88. on "8" OnKey("8");
  89. on "9" OnKey("9");
  90. on "*" OnKey("*");
  91. on "#" OnKey("#");
  92.  
  93. ////////////////////////////////////////////////////////////////////////////////
  94. on "action"
  95. {
  96.         var Item;
  97.         if(CurrentMode=="none") SetMode("menu");
  98.   else if(CurrentMode=="menu")
  99.   {
  100.     switch(SelectedItem)
  101.     {
  102.         case 0:
  103.             SetMode("contact");
  104.             break;
  105.         case 1:
  106.             SetMode("sms");
  107.             break;       
  108.     }
  109.   }
  110.   else if(CurrentMode=="sms")
  111.   {
  112.         CurrentSms = SmsItems[SelectedItem];
  113.         ContainersInvisible();
  114.         SetMode("singlesms");
  115.   }
  116.   else if(CurrentMode=="contact")
  117.   {
  118.     CurrentContact = NumberItems[SelectedItem];
  119.         DisplayContactInfo(NumberItems[SelectedItem]);
  120.   }
  121.   else if(CurrentMode=="contact_info")
  122.   {
  123.         CallContact(CurrentContact);
  124.   }
  125.   else if(CurrentMode=="number")
  126.   {
  127.         CallNumber(CurrentNumber);
  128.   } 
  129.   else if(CurrentMode=="incoming_call")
  130.   {
  131.     SetMode("in_call");
  132.   }
  133. }
  134.  
  135. ////////////////////////////////////////////////////////////////////////////////
  136. on "right_option"
  137. {
  138.   if(CurrentMode=="none")
  139.    {
  140.      SetMode("contact");
  141.    }
  142.   else if(CurrentMode=="menu")
  143.   {
  144.     ContainersInvisible();
  145.         SetMode("none");
  146.   }
  147.   else if(CurrentMode=="contact")
  148.   {
  149.    ContainersInvisible();
  150.    if(MenuOn==true) SetMode("menu");
  151.    else SetMode("none");
  152.   } 
  153.   else if(CurrentMode=="sms")
  154.   {
  155.    ContainersInvisible();
  156.    if(MenuOn==true) SetMode("menu");
  157.    else SetMode("none");
  158.   }
  159.   else if(CurrentMode=="singlesms")
  160.   {
  161.     ContainersInvisible();
  162.         SetMode("sms");
  163.   } 
  164.   else if(CurrentMode=="number")
  165.   {
  166.         if(CurrentNumber.Length <= 1)
  167.          {
  168.            ContainersInvisible();
  169.            SetMode("none");
  170.      }
  171.         else
  172.         {
  173.               var Str = new String(CurrentNumber);
  174.               CurrentNumber = Str.Substr(0, CurrentNumber.Length - 1);
  175.               SetLine(6, CurrentNumber, false, false, true);
  176.         }
  177.   }
  178.  
  179.   else if(CurrentMode=="contact_info")
  180.   {
  181.     ContainersInvisible();
  182.         SetMode("contact");
  183.   } 
  184.   else if(CurrentMode=="incoming_call")
  185.   {
  186.     Game.Interactive = false;
  187.     actor.Talk("I'd better answer. It could be important.");
  188.         Game.Interactive = true;
  189.   }
  190.  
  191.   else if(CurrentMode=="in_call")
  192.   {
  193.     this.StopSound();
  194.         CallCancelled = true;
  195.         SetMode("call_cancelling");
  196.   } 
  197.  
  198. }
  199.  
  200. ////////////////////////////////////////////////////////////////////////////////
  201. on "left_option"
  202. {
  203.   if(CurrentMode=="none")
  204.    {
  205.      SetMode("sms");
  206.    }
  207.   else if(CurrentMode=="menu")
  208.   {
  209.     ContainersInvisible();
  210.     switch(SelectedItem)
  211.     {
  212.         case 0:
  213.             SetMode("contact");
  214.             break;
  215.         case 1:
  216.             SetMode("sms");
  217.             break;       
  218.     }
  219.   }
  220.   else if(CurrentMode=="contact")
  221.   {
  222.     CurrentContact = NumberItems[SelectedItem];
  223.         DisplayContactInfo(NumberItems[SelectedItem]);
  224.   }
  225.   else if(CurrentMode=="sms")
  226.   {
  227.         CurrentSms = SmsItems[SelectedItem];
  228.         SetMode("singlesms");
  229.   }
  230.   else if(CurrentMode=="number")
  231.   {
  232.         CallNumber(CurrentNumber);
  233.   }
  234.   else if(CurrentMode=="contact_info")
  235.   {
  236.         CallContact(CurrentContact);
  237.   }
  238.  
  239.   else if(CurrentMode=="incoming_call")
  240.   {
  241.     SetMode("in_call");
  242.   }
  243. }
  244.  
  245. ////////////////////////////////////////////////////////////////////////////////
  246. on "red"
  247. {
  248.   if(CurrentMode=="in_call")
  249.    {
  250.     this.StopSound();
  251.         CallCancelled = true;
  252.         SetMode("call_cancelling");
  253.    }
  254.  
  255.   else if(CurrentMode=="incoming_call")
  256.    {
  257.         Game.Interactive = false;
  258.     actor.Talk("I'd better answer. It could be important.");
  259.         Game.Interactive = true;
  260.    }
  261.  
  262.   else if(CurrentMode!="none")
  263.    {
  264.     ContainersInvisible();
  265.     SetMode("none");
  266.    }
  267.    
  268.    else this.Close();
  269. }
  270.  
  271. ////////////////////////////////////////////////////////////////////////////////
  272. on "green"
  273. {
  274.   if(CurrentMode=="number")
  275.     {
  276.          CallNumber(CurrentNumber);
  277.         }
  278.   else if(CurrentMode=="contact_info")
  279.     {
  280.         CallContact(CurrentContact);
  281.     }
  282.   else if(CurrentMode=="contact")
  283.     {
  284.         CallContact(NumberItems[SelectedItem]);
  285.     }
  286.   else if(CurrentMode=="incoming_call")
  287.     {
  288.         SetMode("in_call");
  289.     }
  290. }
  291.  
  292. ////////////////////////////////////////////////////////////////////////////////
  293. on "down"
  294. {
  295.         if(CurrentMode=="none" && NumberItems.Count > 0)
  296.         {
  297.           SetMode("contact");
  298.           return;
  299.   }
  300.  
  301.         if(CurrentMode=="singlesms")
  302.         {
  303.           if(ScrollOffset + NumLines < CurrentSms.NumLines) ScrollOffset = ScrollOffset + 1;
  304.           UpdateSms();
  305.           return;
  306.   }
  307.  
  308.         if(CurrentItems!=null)
  309.         {
  310.         var Count = CurrentItems.Count;
  311.           if(Count==null || Count==0) return;
  312.           
  313.           SelectedItem = SelectedItem + 1;
  314.           if(SelectedItem >= Count)
  315.           {
  316.                 SelectedItem = 0;
  317.                 ScrollOffset = 0;
  318.           }
  319.     if(SelectedItem >= ScrollOffset + NumLines) ScrollOffset = ScrollOffset + 1;
  320.                
  321.         UpdateItems();
  322.         }
  323. }
  324.  
  325. ////////////////////////////////////////////////////////////////////////////////
  326. on "up"
  327. {
  328.         if(CurrentMode=="none" && NumberItems.Count > 0)
  329.         {
  330.           SetMode("contact");
  331.           return;
  332.   }
  333.  
  334.         if(CurrentMode=="singlesms")
  335.         {
  336.           if(ScrollOffset > 0) ScrollOffset = ScrollOffset - 1;
  337.           UpdateSms();
  338.           return;
  339.   }
  340.  
  341.   if(CurrentItems!=null)
  342.         {
  343.         var Count = CurrentItems.Count;
  344.           if(Count==null || Count==0) return;
  345.           
  346.           SelectedItem = SelectedItem - 1;
  347.           if(SelectedItem < 0)
  348.           {
  349.                 SelectedItem = Count - 1;
  350.             ScrollOffset = Count - NumLines;
  351.             if(ScrollOffset < 0) ScrollOffset = 0;
  352.           }
  353.     if(SelectedItem < ScrollOffset) ScrollOffset = ScrollOffset - 1;
  354.                
  355.                 UpdateItems();
  356.         }
  357.  
  358. }
  359.  
  360. ////////////////////////////////////////////////////////////////////////////////
  361. function SetMode(Mode)
  362. {
  363.         if(Mode==CurrentMode) return;
  364.                        
  365.         CurrentMode = Mode;
  366.  
  367.   SelectedItem = 0;
  368.         ScrollOffset = 0;
  369.         CurrentItems = null;
  370.        
  371.         ////////////////////////////////////////
  372.         if(CurrentMode=="none")
  373.         {
  374.         MenuOn = false;
  375.     SetLine(0, "");
  376.     SetLine(1, "");
  377.     SetLine(2, "");
  378.     SetLine(3, "");
  379.     SetLine(4, "");
  380.         SetLine(5, "");
  381.         SetLine(6, "");
  382.        
  383.         }
  384.        
  385.         ////////////////////////////////////////
  386.         else if(CurrentMode=="menu")
  387.         {
  388.                 MenuBackground.Visible = true;
  389.                 MenuOn = true;
  390.                 CurrentItems = MenuItems;
  391.                 UpdateItems();
  392.         }
  393.  
  394.   ////////////////////////////////////////
  395.         else if(CurrentMode=="contact")
  396.         {
  397.           ContactsBackground.Visible = true;
  398.           
  399.           if(ToInt(NumberItems.Count)==0)
  400.           {
  401.                 ClearDisplay();
  402.                 SetLine(2, "No contacts", false, true);
  403.                 Game.Interactive = false;
  404.                 Sleep(1000);
  405.                 Game.Interactive = true;
  406.                
  407.                 SetMode("menu");
  408.                 return;
  409.           }
  410.  
  411.  
  412.                 CurrentItems = NumberItems;
  413.                 UpdateItems();
  414.         }
  415.  
  416.   ////////////////////////////////////////
  417.         else if(CurrentMode=="sms")
  418.         {
  419.           MessagesBackground.Visible = true;
  420.           if(ToInt(SmsItems.Count)==0)
  421.           {
  422.                 ClearDisplay();
  423.                 SetLine(2, "No messages", false, true);
  424.                 Game.Interactive = false;
  425.                 Sleep(1000);
  426.                 Game.Interactive = true;
  427.                
  428.                 SetMode("menu");
  429.                 return;
  430.           }
  431.           
  432.                 CurrentItems = SmsItems;
  433.                 UpdateItems();
  434.         }       
  435.  
  436.   ////////////////////////////////////////
  437.         else if(CurrentMode=="singlesms")
  438.         {
  439.             SingleMessageBackground.Visible = true;
  440.                 UpdateSms();
  441.         }
  442.  
  443.   ////////////////////////////////////////
  444.         else if(CurrentMode=="number")
  445.         {
  446.                 NumberBackground.Visible = true;
  447.                 ClearDisplay();
  448.                 CurrentNumber = "";
  449.         }
  450.        
  451.   ////////////////////////////////////////
  452.         else if(CurrentMode=="contact_info")
  453.         {
  454.             ContactInfoBackground.Visible = true;
  455.         }
  456.        
  457.   ////////////////////////////////////////
  458.         else if(CurrentMode=="in_call")
  459.         {
  460.             ContainersInvisible();
  461.             InCallBackground.Visible = true;
  462.        
  463.         //handles the conversations, based on variables (in this case, Name3Calling, because Name3 is calling us) set in other scripts.
  464.         if(Name3Calling==1)
  465.          {
  466.           Game.StopSound();
  467.           IncomingCallBackground.Visible = false;
  468.           SetLine(3, "Connected...", false, true);
  469.           SetLine(4, "Name3", false, true);
  470.           var name3 = Game.LoadEntity("entities\name3\name3.entity");
  471.       Game.Interactive = false;
  472.       actor.Talk("Hello? Who is this?");
  473.           name3.Talk("Hi, my name is 3, Name 3. Cool name eh?");
  474.           actor.Talk("Yeah it's ok I guess, but not as good as my name....actor!");
  475.           name3.Talk("Yeah, actor is a pretty cool name, but NEVER will it be as cool as mine ok? Anyway, I gotta go. I'm needed in another script.");
  476.           actor.Talk("Ok dude, catch ya later at the Global Variable Conference.");
  477.           name3.Talk("Nah. I aint going to that, I prefer to stay local.");
  478.           actor.Talk("Ummmmmmmmmmmmm k then.");
  479.           Game.UnloadObject(name3);
  480.           SetMode("call_cancelling");
  481.           Sleep(2500);
  482.           ContainersInvisible();
  483.           SetMode("none");
  484.           
  485.           //Name3 variable set back to zero, and Name3Calling.OneDone set to "true" so we know Name3's first conversation is over.
  486.           Name3Calling = 0;
  487.           Name3Calling.OneDone = true;
  488.           Game.Interactive = true;
  489.          }
  490.         }
  491.        
  492.   ////////////////////////////////////////
  493.         else if(CurrentMode=="call_cancelling")
  494.         {
  495.             ClearDisplay();
  496.             CallCancellingBackground.Visible = true;
  497.                 SetLine(3, "Disconnecting...", false, true);
  498.         }
  499.        
  500.   ////////////////////////////////////////
  501.         else if(CurrentMode=="incoming_call")
  502.         {
  503.             IncomingCallBackground.Visible = true;
  504.         }
  505. }
  506.  
  507. ////////////////////////////////////////////////////////////////////////////////
  508. function UpdateItems()
  509. {
  510.         var Count = CurrentItems.Count;
  511.         if(Count==null || Count==0) return;
  512.        
  513.         var Item;
  514.  
  515.   ClearDisplay();
  516.         for(var i=ScrollOffset; i<Count; i=i+1)
  517.         {
  518.                 if(i - ScrollOffset >= NumLines) break;
  519.                 Item = CurrentItems[i];
  520.                
  521.                 SetLine(i - ScrollOffset, Item.Text, i==SelectedItem);
  522.         }
  523.        
  524. }
  525.  
  526. ////////////////////////////////////////////////////////////////////////////////
  527. function UpdateSms()
  528. {
  529.         ClearDisplay();
  530.  
  531.         for(var i=ScrollOffset; i<CurrentSms.NumLines; i=i+1)
  532.         {
  533.                 if(i - ScrollOffset >= NumLines) break;
  534.                
  535.                 SetLine(i - ScrollOffset, CurrentSms[i]);
  536.         }
  537.  
  538. }
  539.  
  540. ////////////////////////////////////////////////////////////////////////////////
  541. function ClearDisplay()
  542. {
  543.   for(var i=0; i<NumLines; i=i+1)
  544.         {
  545.                 SetLine(i, "");
  546.         }
  547.  
  548. }
  549.  
  550. ////////////////////////////////////////////////////////////////////////////////
  551. function SetLine(LineNum, Text, Invert, Center, Right)
  552. {
  553.         var Line = this.GetControl("Line" + (LineNum + 1));
  554.         if(Line==null) return;
  555.        
  556.         if(Invert==null) Invert = false;
  557.         if(Center==null) Center = false;
  558.         if(Right==null) Right = false;
  559.        
  560.         Line.Text = Game.ExpandString(Text);
  561.                
  562.         if(Invert)
  563.         {
  564.                 Line.SetFont("phone\fonts\arial_display_small_white.font");
  565.                 Line.SetImage("phone\highlight.png");
  566.         }
  567.         else
  568.         {
  569.                 Line.SetFont("phone\fonts\arial_display_small.font");
  570.                 Line.SetImage(null);
  571.         }
  572.        
  573.         if(Center) Line.TextAlign = TAL_CENTER;
  574.         else if(Right) Line.TextAlign = TAL_RIGHT;
  575.         else Line.TextAlign = TAL_LEFT;
  576.        
  577. }
  578.  
  579.  
  580. ////////////////////////////////////////////////////////////////////////////////
  581. function AddMenu(Text)
  582. {
  583.         var Count = MenuItems.Count;
  584.         if(Count==null) Count = 0;
  585.        
  586.         var Item;
  587.         Item.Text = Text;
  588.        
  589.         MenuItems[Count] = Item;
  590.         MenuItems.Count = Count + 1;
  591. }
  592.  
  593. ////////////////////////////////////////////////////////////////////////////////
  594. function AddNumber(Name, Number, ID)
  595. {
  596.         var Count = NumberItems.Count;
  597.         if(Count==null) Count = 0;
  598.        
  599.         var Item;
  600.         Item.Text = Name;
  601.         Item.Number = Number;
  602.         Item.ID = ID;
  603.        
  604.         NumberItems[Count] = Item;
  605.         NumberItems.Count = Count + 1;
  606. }
  607.  
  608. ////////////////////////////////////////////////////////////////////////////////
  609. function AddSms(From, Line1, Line2, Line3, Line4, Line5, Line6, Line7, Line8, Line9)
  610. {
  611.         var Count = SmsItems.Count;
  612.         if(Count==null) Count = 0;
  613.        
  614.         var Item;
  615.         Item.Text = Game.ExpandString("From: ") + Game.ExpandString(From);
  616.         Item[0] = Line1;
  617.         Item[1] = Line2;
  618.         Item[2] = Line3;
  619.         Item[3] = Line4;
  620.         Item[4] = Line5;
  621.         Item[5] = Line6;
  622.         Item[6] = Line7;
  623.         Item[7] = Line8;
  624.         Item[8] = Line9;
  625.        
  626.         Item.NumLines = 0;
  627.         for(var i=8; i>=0; i=i-1)
  628.         {
  629.                 if(Item[i]!="" && Item[i]!=null)
  630.                 {
  631.                         Item.NumLines = i + 1;
  632.                         break;
  633.                 }
  634.         }
  635.                
  636.         SmsItems[Count] = Item;
  637.         SmsItems.Count = Count + 1;
  638. }
  639.  
  640.  
  641. ////////////////////////////////////////////////////////////////////////////////
  642. function OnKey(Key)
  643. {
  644.         var KeySound = Key;
  645.         if(KeySound=="*") KeySound = "star";
  646.         this.PlaySound("phone\sfx\" + KeySound + ".ogg");
  647.        
  648.         if(CurrentMode=="none" || CurrentMode=="menu")
  649.         {
  650.                 SetMode("number");
  651.         }
  652.         if(CurrentMode=="number")
  653.         {
  654.                 if(CurrentNumber.Length>=14) return;
  655.                 CurrentNumber = CurrentNumber + Key;
  656.                
  657.                 SetLine(6, CurrentNumber, false, false, true);
  658.         }
  659.        
  660. }
  661.  
  662. ////////////////////////////////////////////////////////////////////////////////
  663. function CallNumber(Number)
  664. {
  665.         for(var i=0; i<NumberItems.Count; i=i+1)
  666.         {
  667.                 var Item = NumberItems[i];
  668.                 if(Item.Number==Number)
  669.                 {
  670.                         CallContact(Item);
  671.                         return;
  672.                 }
  673.         }
  674.         this.CalledNumber = Number;
  675.         DoCall(Number);
  676. }
  677.  
  678. ////////////////////////////////////////////////////////////////////////////////
  679. function CallContact(ContactItem)
  680. {
  681.         this.CalledNumber = ContactItem.ID;
  682.         DoCall(ContactItem.Text);
  683. }
  684.  
  685.  
  686. ////////////////////////////////////////////////////////////////////////////////
  687. function DoCall(Name)
  688. {
  689.         ClearDisplay();
  690.         SetMode("in_call");
  691.         SetLine(2, "Calling...", false, true);
  692.         SetLine(3, Name, false, true);
  693.        
  694.  while(CallCancelled==false && RingCounter<5)
  695.   {
  696.         this.PlaySound("phone\sfx\tone.ogg");
  697.         Sleep(2500);
  698.         RingCounter = RingCounter + 1;
  699.   }
  700.  
  701.   if(CallCancelled==true)
  702.    {
  703.         CallCancelled = false;
  704.         RingCounter = 0;
  705.     ContainersInvisible();
  706.         SetMode("none");
  707.    }
  708.   else
  709.    {
  710.         this.Close();
  711.    }
  712. }
  713.  
  714. ////////////////////////////////////////////////////////////////////////////////
  715. function ContainersInvisible() //easy way to set all entity containers to invisible
  716. {
  717.   ClearDisplay();
  718.   ContactsBackground.Visible = false;
  719.   NumberBackground.Visible = false;
  720.   MessagesBackground.Visible = false;
  721.   SingleMessageBackground.Visible = false;
  722.   ContactInfoBackground.Visible = false;
  723.   InCallBackground.Visible = false;
  724.   IncomingCallBackground.Visible = false;
  725.   CallCancellingBackground.Visible = false;
  726.   MenuBackground.Visible = false;
  727. }
  728.  
  729. ////////////////////////////////////////////////////////////////////////////////
  730. function DisplayContactInfo(ContactItem)
  731. {
  732.    ClearDisplay();
  733.    SetMode("contact_info");
  734.    SetLine(5, ContactItem.Text, false, false, true);
  735.    SetLine(6, ContactItem.Number, false, false, true);
  736. }
  737.  
  738. ////////////////////////////////////////////////////////////////////////////////
  739. on "close"
  740. {
  741.         this.Close();
  742. }
  743.  
« Last Edit: August 29, 2007, 04:34:31 PM by TheDerman »
Logged

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Cell phone
« Reply #17 on: September 25, 2007, 02:28:20 AM »

Thanks alot!
Logged
... delete the inner sleep ...

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Cell phone
« Reply #18 on: January 14, 2011, 10:18:19 AM »

Hey Im having issues with the CalledNumber function.. When I dial a number such as 12345,

if(CalledNumber=="12345")
  {
     actor.Talk("I just dials 12345, wow");
  }

When I dial the number, the actor does not talk, or nothing happens. Any suggestions?
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Cell phone
« Reply #19 on: January 15, 2011, 02:47:37 AM »

nevermind, i got it working  !
Logged
Pages: 1 [2]  All
 

Page created in 0.115 seconds with 20 queries.