Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

TrollandToad.com
Reply
 
Thread Tools
  #1    
Old August 19th, 2010 (12:10 PM).
carmaniac's Avatar
carmaniac carmaniac is offline
Where the pickle surprise at?
     
    Join Date: Apr 2009
    Location: England
    Age: 22
    Nature: Relaxed
    Posts: 682
    Well, this is for all of those people who keep asking how to make a touchscreen using crazyninjaguy's mouse module and dualscreen.
    Which I can't link the Mouse module as you have to find it over at planetdev.net.

    Well, for those who have his two scripts this is what you need to do.
    To make a menu have the mouse function you need to find the loop do of the script and then do this following script:

    Mouse.mouse_in_area?(x,y,width,height)

    That code there sets up the area of where the mouse is going to be expected.
    the x,y are the co-ordinates of where the area is located while the width and height is the area size.
    For example:

    Mouse.mouse_in_area?(30,30,100,100)

    That's an example of a button area for instance.
    The structure needed for the button to work would be this:

    Mouse.mouse_in_area?(30,30,100,100)
    if Mouse.click?(1)#left mouse button
    do stuff# This is where you put all of the commands you want to happen
    end # ends the check for the left mouse button being clicked
    end# ends the check for the mouse being in a certain area.


    Well that's all that's really needed to be known about the mouse script.
    I will only help those who make an effort to learn .
    __________________

    Pokémon: Lost Souls.







    Developed by Carmaniac.


    Quote:
    Originally Posted by Luka S.J. View Post
    My balls seem to be fine.
    Reply With Quote

    Relevant Advertising!

      #2    
    Old August 24th, 2010 (7:24 PM).
    Orangturttle's Avatar
    Orangturttle Orangturttle is offline
    Magikarp MASTER!
       
      Join Date: Jul 2010
      Gender: Male
      Nature: Jolly
      Posts: 44
      Oh goodness! :D
      Thanks bro! I'll be trying my luck with this soon.. haha. :D
      __________________

      Reply With Quote
        #3    
      Old August 25th, 2010 (6:46 AM).
      Gigatom~'s Avatar
      Gigatom~ Gigatom~ is offline
      Pokemon Ruthenium Creator ~
         
        Join Date: Jan 2010
        Age: 22
        Gender: Male
        Posts: 116
        Thanks for this.
        A question for this: Mouse.mouse_in_area?(x,y,width,height)
        Does width,height mean teh width and height from the Picture?

        Gigatom~
        __________________


        Check out my deviantArt! :3
        Reply With Quote
          #4    
        Old August 25th, 2010 (6:48 AM).
        carmaniac's Avatar
        carmaniac carmaniac is offline
        Where the pickle surprise at?
           
          Join Date: Apr 2009
          Location: England
          Age: 22
          Nature: Relaxed
          Posts: 682
          Quote:
          Originally Posted by Gigatom~ View Post
          Thanks for this.
          A question for this: Mouse.mouse_in_area?(x,y,width,height)
          Does width,height mean teh width and height from the Picture?

          Gigatom~
          Yes it does, sorry for not mentioning that but I will expand this page into more detail when I have time later on in the day.
          __________________

          Pokémon: Lost Souls.







          Developed by Carmaniac.


          Quote:
          Originally Posted by Luka S.J. View Post
          My balls seem to be fine.
          Reply With Quote
            #5    
          Old August 25th, 2010 (6:50 AM).
          Gigatom~'s Avatar
          Gigatom~ Gigatom~ is offline
          Pokemon Ruthenium Creator ~
             
            Join Date: Jan 2010
            Age: 22
            Gender: Male
            Posts: 116
            Okay , thank you very much :D
            __________________


            Check out my deviantArt! :3
            Reply With Quote
              #6    
            Old August 25th, 2010 (7:51 AM).
            Poeman Poeman is offline
            Banned
               
              Join Date: Nov 2008
              Age: 22
              Gender: Male
              Posts: 760
              D: you have opened new things for the community, I can't believe you're handing them this.

              Now is this version 1, 2, or 3?
              Reply With Quote
                #7    
              Old August 25th, 2010 (11:09 AM).
              carmaniac's Avatar
              carmaniac carmaniac is offline
              Where the pickle surprise at?
                 
                Join Date: Apr 2009
                Location: England
                Age: 22
                Nature: Relaxed
                Posts: 682
                Quote:
                Originally Posted by Poeman View Post
                D: you have opened new things for the community, I can't believe you're handing them this.

                Now is this version 1, 2, or 3?
                Shhh... Poeman XD. If I was giving the community something it would be this:
                An script base to making an touchscreen menu although I'm not revealing exactly how to call the script and keep it on the screen . That is for those determined game maker enthusiasts. And at the moment version 1.

                Code:
                class Window_Menu < SpriteWindow_Base
                  def initialize
                    @sprites = {}
                    @sprites[""] = Sprite.new
                    @sprites[""].x = 
                    @sprites[""].y = 
                    @sprites[""].z = 
                    
                  end
                  def dispose
                    
                  end
                  def refresh
                    if Mouse.mouse_in_area?(x,y,width,height)
                      if Mouse.click?(1)
                        
                      end
                    end
                    
                  end
                end
                __________________

                Pokémon: Lost Souls.







                Developed by Carmaniac.


                Quote:
                Originally Posted by Luka S.J. View Post
                My balls seem to be fine.
                Reply With Quote
                  #8    
                Old August 25th, 2010 (6:23 PM).
                Pichuichu's Avatar
                Pichuichu Pichuichu is offline
                Creator Of (Insert Here)
                   
                  Join Date: Apr 2010
                  Location: Isshu-Huin City
                  Gender: Male
                  Posts: 273
                  Who persuaded you to post this? but yes this would help game developers to make touch screen games. Thanks.
                  __________________

                  Credit: Invasion For Sig And Avatar.



                  My Da Account ->here<-
                  Reply With Quote
                    #9    
                  Old August 26th, 2010 (5:15 AM).
                  carmaniac's Avatar
                  carmaniac carmaniac is offline
                  Where the pickle surprise at?
                     
                    Join Date: Apr 2009
                    Location: England
                    Age: 22
                    Nature: Relaxed
                    Posts: 682
                    Quote:
                    Originally Posted by Pichuichu View Post
                    Who persuaded you to post this? but yes this would help game developers to make touch screen games. Thanks.
                    No one, I just felt like posting something like this seeming as only a few people knew how to do it.
                    __________________

                    Pokémon: Lost Souls.







                    Developed by Carmaniac.


                    Quote:
                    Originally Posted by Luka S.J. View Post
                    My balls seem to be fine.
                    Reply With Quote
                      #10    
                    Old August 28th, 2010 (9:20 AM).
                    matrockista06 matrockista06 is offline
                       
                      Join Date: Jun 2009
                      Gender: Male
                      Posts: 14
                      where do i paste the codes?
                      Reply With Quote
                        #11    
                      Old August 29th, 2010 (4:00 PM).
                      Pichuichu's Avatar
                      Pichuichu Pichuichu is offline
                      Creator Of (Insert Here)
                         
                        Join Date: Apr 2010
                        Location: Isshu-Huin City
                        Gender: Male
                        Posts: 273
                        may i ask if i put the co-ordinates in the top left corner of where i want?
                        __________________

                        Credit: Invasion For Sig And Avatar.



                        My Da Account ->here<-
                        Reply With Quote
                          #12    
                        Old August 31st, 2010 (1:24 PM).
                        zingzags's Avatar
                        zingzags zingzags is offline
                        PokemonGDX creator
                           
                          Join Date: Jan 2009
                          Location: Boston
                          Age: 23
                          Nature: Adamant
                          Posts: 562
                          Quote:
                          Originally Posted by Pichuichu View Post
                          may i ask if i put the co-ordinates in the top left corner of where i want?
                          Mouse.mouse_in_area?(co-ordinate-x,co-ordinate-y, height i think,and width i think of the button)
                          __________________
                          Check out the Pokemon Game Engine I am working on:
                          https://github.com/sjosegarcia/Pokemon
                          Reply With Quote
                            #13    
                          Old August 31st, 2010 (1:37 PM).
                          Pichuichu's Avatar
                          Pichuichu Pichuichu is offline
                          Creator Of (Insert Here)
                             
                            Join Date: Apr 2010
                            Location: Isshu-Huin City
                            Gender: Male
                            Posts: 273
                            no that but do i make the co-ordinates the top left corner of the button?
                            __________________

                            Credit: Invasion For Sig And Avatar.



                            My Da Account ->here<-
                            Reply With Quote
                              #14    
                            Old August 31st, 2010 (1:54 PM).
                            zingzags's Avatar
                            zingzags zingzags is offline
                            PokemonGDX creator
                               
                              Join Date: Jan 2009
                              Location: Boston
                              Age: 23
                              Nature: Adamant
                              Posts: 562
                              Quote:
                              Originally Posted by Pichuichu View Post
                              no that but do i make the co-ordinates the top left corner of the button?
                              Ya from the top left corner of the very top screen which is (0,0), then lets say u want a button on the bottom screen 20 pixels from each part.
                              sense there is a top screen and if you are using the spacer thing the start of the bottom screen will be (0,340)

                              and to make the button 20 pixels apart use (20,360)
                              __________________
                              Check out the Pokemon Game Engine I am working on:
                              https://github.com/sjosegarcia/Pokemon
                              Reply With Quote
                                #15    
                              Old October 31st, 2010 (4:27 PM).
                              Yuoaman's Avatar
                              Yuoaman Yuoaman is offline
                              Legen- wait for it...
                              • Silver Tier
                               
                              Join Date: Jul 2005
                              Location: Ontario, Canada
                              Age: 25
                              Gender: Male
                              Nature: Relaxed
                              Posts: 4,675
                              Please try to refrain from posting in topics that have not had replies in over two months from now on, Urugamosu.

                              Closed.
                              __________________

                              Suit Up!
                              Awesome REGULAR MEMBER THAT OCCASIONALLY FREQUENTS FORUMS.

                              "pps new screenie" - No, really shut up yuoaman.

                              Haaave you read my LP?
                              Pokémon Quartz - The only one of mine really worth reading.

                              What about my [Un]Abridged series?
                              Aquaman the Unabridged Parody Series - Language warning.

                              The Playbook: My Anime List | Raptr | BackLoggery | Twitter


                              83% of this signature is empty space.

                              -dary!
                              Reply With Quote
                              Reply

                              Quick Reply

                              Join the conversation!

                              Create an account to post a reply in this thread, participate in other discussions, and more!

                              Create a PokéCommunity Account

                              Sponsored Links
                              Thread Tools

                              Posting Rules
                              You may not post new threads
                              You may not post replies
                              You may not post attachments
                              You may not edit your posts

                              BB code is On
                              Smilies are On
                              [IMG] code is On
                              HTML code is Off

                              Forum Jump


                              All times are GMT -8. The time now is 4:05 AM.