The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Archive January 2006 to April 2008 (https://www.pokecommunity.com/forumdisplay.php?f=177)
-   -   PokeGear/ PokeNav Creation Thread - RMXP (https://www.pokecommunity.com/showthread.php?t=58215)

Matt12345678 December 25th, 2005 8:25 PM

PokeGear/ PokeNav Creation Thread - RMXP
 
Does anyone remember the old RM2K3 thread with the Battle System Making project? I thought it would be a good idea to do the same thing, exept for RMXP, and with a PokeGear or PokeNav. Unfortunately, I have no idea where to begin...

Here is a list of everyone who is currently working on the project:
Matt12345678
OverTheBelow

Special Thanks to:
Blizzy

Goal:
To make a PokeGear and a PokeNav, each one identical to the ones in Crystal and Emerald

If you want to help with the project, that would be much appreciated.

To the Mods:
If this kind of thread is not allowed, feel free to close it. :nervous:

OverTheBelow December 26th, 2005 5:18 AM

.........................

Matt12345678 December 26th, 2005 7:40 AM

Quote:

Originally Posted by OverTheBelow
Sounds good, problem is, I don't know hardly anything about RGSS, but I want to help. I can do good images...

ok. i added you to the first post...

OverTheBelow December 26th, 2005 10:00 AM

.........................

Matt12345678 December 26th, 2005 4:04 PM

Quote:

Originally Posted by OverTheBelow
What should I do?

Images?

Add me to msn: [email protected]

sorry, i don't have MSN :\ ... my computer is wierd like that...

if you could get images for the PokeNav that would be great :D

Blizzy December 27th, 2005 2:51 AM

2 Attachment(s)
this isnt too hard to do,
in fact, i already started writing the gear.

here is a piece of code, which works well so far
you only need 2 pictures called 'background' and 'arrow_1'.
(see attachement)

here is the code so far, it's not perfect so far (only map with cursor works now)
Code:

class Window_Command < Window_Selectable
  attr_reader    :commands
end

# define a Scene
class Scene_PokeGear
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # here comes the code to initialize the objects

    # for example the command_window, help_window, background and the cursor
    # create the commands
    s1 = "Time"
    s2 = "Map"
    s3 = "Radio"
    s4 = "Phone"
    s5 = "Exit"
    commands = [s1,s2,s3,s4,s5]
    # create a command window (vertical)
    @command_window = Window_Command.new(132, commands)
    @command_window.z = 3

    # create a help window to display text
    @help_window = Window_Help.new
    # set the width and height
    @help_window.width = 156
    @help_window.height = 64
    # set the x, y and z values
    @help_window.x = $width - @help_window.width
    @help_window.y = $height - @help_window.height
    @help_window.z = 3
    # set no text
    @help_window.set_text("")

    # create a sprite
    @background = Sprite.new
    # create a bitmap
    @background.bitmap = RPG::Cache.picture("background")
    # give the bitmap a position by the x and y value
    @background.x, @background.y = 0, 0
    # make the background double size
    @background.zoom_x, @background.zoom_y = 2,2
    # give the bitmap a layer
    @background.z = 0

    # now we do the same for the cursor
    # this cursor is for the region-map
    @cursor = Sprite.new
    @cursor.bitmap = RPG::Cache.picture("arrow_1")
    @cursor.x, @cursor.y = 100, 100
    # make the cursor double size
    @cursor.zoom_x, @cursor.zoom_y = 2,2
    @cursor.visible = false
    # make the layer 1 so it's above the background
    @cursor.z = 9

    # Window for the cursor display
    @window = Window_Base.new(100, 100, 128, 128)
    @window.z = 8
    @window.visible = false

    # Transition run
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # dispose content
    @command_window.dispose
    @help_window.dispose
    @background.dispose
    @cursor.dispose
    @window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # update content
    @command_window.update
    @help_window.update
    @background.update
    @cursor.update
    @window.update

    # call update_command when command_window is active
    if @command_window.active
      update_command
      return
    end

    # check if the cursor is on the map
    # and check if the command_window is not active
    # then call the method update_cursor
    if @command_window.index == 1 && [email protected]_window.active
      update_cursor
      update_text
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Update Command
  #--------------------------------------------------------------------------
  def update_command
    if Input.trigger?(Input::B)
      $scene = Scene_Map.new
      return
    end

    if Input.trigger?(Input::C)
      case @command_window.commands[@command_window.index]
      when "Time"

      when "Map"
        update_cursor
      when "Radio"

      when "Phone"

      when "Exit"
        $scene = Scene_Map.new

      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Update Map(Region) Cursor
  #--------------------------------------------------------------------------
  def update_cursor
    @cursor.visible = true
    @window.visible = true
    @command_window.active = false
    # define variables for min/max position of the cursor,
    # so it can't leave the screen.
    min_x = 100
    max_x = 200
    min_y = 100
    max_y = 200

    # return to the command_window if press cancel button
    if Input.trigger?(Input::B)
      @command_window.active = true
      @cursor.visible = false
      @window.visible = false
    end

    # press Shift key to check x and y spots
    if Input.trigger?(Input::SHIFT)
      print "X: #{@cursor.x} , Y: #{@cursor.y}"
    end

    # if press right and the cursor x is smaller then max_x,
    # move the cursor right
    if Input.press?(Input::RIGHT) and @cursor.x < max_x
      @cursor.x += 2
    end
    # if press left and the cursor x is bigger then min_x,
    # move the cursor left
    if Input.press?(Input::LEFT) and @cursor.x > min_x
      @cursor.x -= 2
    end
    # if press down and the cursor y is smaller then max_y,
    # move the cursor down
    if Input.press?(Input::DOWN) and @cursor.y < max_y
      @cursor.y += 2
    end
    # if press up and the cursor y is bigger then min_y,
    # move the cursor up
    if Input.press?(Input::UP) and @cursor.y > min_y
      @cursor.y -= 2
    end
  end
  #--------------------------------------------------------------------------
  # * Update Text
  #--------------------------------------------------------------------------
  def update_text
    # if the cursor is between the values, display the text
    if @cursor.x.between?(100, 120) && @cursor.y.between?(100, 120)
      @help_window.set_text("Left-Up")
    elsif @cursor.x.between?(190, 200) && @cursor.y.between?(100, 120)
      @help_window.set_text("Right-Up")
    elsif @cursor.x.between?(100, 120) && @cursor.y.between?(190, 200)
      @help_window.set_text("Left-Down")
    elsif @cursor.x.between?(190, 200) && @cursor.y.between?(190, 200)
      @help_window.set_text("Right-Down")
    elsif @cursor.x.between?(140, 160) && @cursor.y.between?(140, 160)
      @help_window.set_text("Middle")
    elsif @cursor.x.between?(190, 200) && @cursor.y.between?(110, 190)
      @help_window.set_text("Right")
    elsif @cursor.x.between?(100, 110) && @cursor.y.between?(110, 190)
      @help_window.set_text("Left")
    elsif @cursor.x.between?(110, 190) && @cursor.y.between?(100, 110)
      @help_window.set_text("Up")
    elsif @cursor.x.between?(110, 190) && @cursor.y.between?(190, 200)
      @help_window.set_text("Down")
    else
      @help_window.set_text("")
    end
  end
end


while moving with the cursor, press shift key to keep track of the x and y values
have fun toying with it :)

lightou December 27th, 2005 3:20 AM

wow it's cool Blizzy ! But how to do my map in the "Map" on the pokegear, my picture ?

Blizzy December 27th, 2005 4:31 AM

i haven't done that part.
and i only will do that for myself.
this is just sample coding.

Matt12345678 December 27th, 2005 10:11 AM

Quote:

Originally Posted by Blizzy
this isnt too hard to do,
in fact, i already started writing the gear.

here is a piece of code, which works well so far
you only need 2 pictures called 'background' and 'arrow_1'.
(see attachement)

here is the code so far, it's not perfect so far (only map with cursor works now)

while moving with the cursor, press shift key to keep track of the x and y values
have fun toying with it :)

thanks! i added you to the first post....

Blizzy December 29th, 2005 3:40 AM

Quote:

Originally Posted by Matt12345678
thanks! i added you to the first post....

Quote:

Here is a list of everyone who is currently working on the project:
Matt12345678
OverTheBelow
Blizzy
i dont help you with this, it's only sample code.
so you dont have to add me.

Matt12345678 January 3rd, 2006 12:30 PM

you don't have to help, but you deserve credit. :P

Silon January 3rd, 2006 2:24 PM

Hey! This looks great! Can't wait till its done. :P Happy coding!


All times are GMT -8. The time now is 5:02 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.