RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Floating Location Window

0 Members and 1 Guest are viewing this topic.

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Do you want a window to pop up everytime you enter a new map area? Just insert this above main.

Code: [Select]
class Scene_Title
  #Dubealex Addition (from XRXS) to show Map Name on screen
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end
class Game_Map
#Dubealex Addition (from XRXS) to show Map Name on screen
def name
$map_infos[@map_id]
end
end
class Window_Float_Location < Window_Base
   def initialize(location = '')
      super(0,416,232,64)
      self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = 'Times New Roman'
      self.contents.font.size = 22
      self.opacity = 100
      self.back_opacity = 100
      @location = location
      @wait_count = 70
      show_location
   end
   def show_location
      self.contents.clear
      self.contents.font.color = normal_color
      w = self.contents.width
      h = self.contents.height
      self.contents.draw_text(0,0,w,h,@location,0)
      wait
   end
   def wait
     loop do
       self.update
       @wait_count -= 1
       if @wait_count == 0
         break
       end
     end
     self.dispose
   end
   def update
     Graphics.update
   end
end
class Scene_Map
  def transfer_player
    # Clear player place move call flag
    $game_temp.player_transferring = false
    # If move destination is different than current map
    if $game_map.map_id != $game_temp.player_new_map_id
      # Set up a new map
      $game_map.setup($game_temp.player_new_map_id)
    end
    # Set up player position
    $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
    # Set player direction
    case $game_temp.player_new_direction
    when 2  # down
      $game_player.turn_down
    when 4  # left
      $game_player.turn_left
    when 6  # right
      $game_player.turn_right
    when 8  # up
      $game_player.turn_up
    end
    # Straighten player position
    $game_player.straighten
    # Update map (run parallel process event)
    $game_map.update
    # Remake sprite set
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    # If processing transition
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      Graphics.transition(20)
    end
    location = $game_map.name
    float_location = Window_Float_Location.new(location)
    # Run automatic change for BGM and BGS set on the map
    $game_map.autoplay
    # Frame reset
    Graphics.frame_reset
    # Update input information
    Input.update
  end
end


Yes I realize the code itself isn't that pretty, but I'll clean it up later, it was a quick job.

BTW: credit to dubealex for the location name itself.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

***
Rep:
Level 90
Great script! but is there a way to make it so you can walk while it says the location?
Quote
Zxmelee says: I FUCKED A CHICK GEEZ
Neko says: I doubt it was a girl
Neko says: Was "she" working the corners?
Zxmelee says: Well, I was lying...
Zxmelee says: but, oh man. They were all over me
Neko says: With a few bucks
Neko says: That hapens

Pwnzorz'd

***
Rep:
Level 90
No answer? Seems kinda mean =\ (   Sorry for double post =[  )
Quote
Zxmelee says: I FUCKED A CHICK GEEZ
Neko says: I doubt it was a girl
Neko says: Was "she" working the corners?
Zxmelee says: Well, I was lying...
Zxmelee says: but, oh man. They were all over me
Neko says: With a few bucks
Neko says: That hapens

Pwnzorz'd

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Quote from: Neko
No answer? Seems kinda mean =\ (   Sorry for double post =[  )


Well you happened to pick the 3 hours I was at karate -_- lol.

I'm working on that atm lol.

EDIT: well, I can, but as soon as you move anywhere, you go straight in that direction until the window goes away no matter what you press; which shouldn't be happening, so...
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

***
Rep:
Level 90
Erm.. ummm.. can you not make it like a regular message window really? like have it auto bring up a message window?
Quote
Zxmelee says: I FUCKED A CHICK GEEZ
Neko says: I doubt it was a girl
Neko says: Was "she" working the corners?
Zxmelee says: Well, I was lying...
Zxmelee says: but, oh man. They were all over me
Neko says: With a few bucks
Neko says: That hapens

Pwnzorz'd

******
Rep:
Level 91
Quote from: Neko
Erm.. ummm.. can you not make it like a regular message window really? like have it auto bring up a message window?


if you want that you don't need a script..
put a message button on each teleporter

something like:

teleport(new map)
-message: Welcome to place X

and then you can have all sorts of useless stuff in the message ~_~

tsu , nice script, though being stuck until it goes away is sort of not the way i like it ~_~
holy shit my sig was big!

***
Rep:
Level 90
ok, but is there a way to make it kinda transparent and on the bottom corse like that?
Quote
Zxmelee says: I FUCKED A CHICK GEEZ
Neko says: I doubt it was a girl
Neko says: Was "she" working the corners?
Zxmelee says: Well, I was lying...
Zxmelee says: but, oh man. They were all over me
Neko says: With a few bucks
Neko says: That hapens

Pwnzorz'd

******
Rep:
Level 91
Quote from: Neko
ok, but is there a way to make it kinda transparent and on the bottom corse like that?


message display options button.
just don't show window and bottom

using slipknot's script or rm2k3 or rm2k you can even make the window go away after a certain period of time
holy shit my sig was big!

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
To reduce the ammount of time the window shows, just find this line -

Code: [Select]
@wait_count = 70


And make the number lower.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

******
Rep:
Level 91
yar.. but any lower than that will make the map name hard to read
i actually want it a little bit longer but allowing the game to keep going with it could be really nice... >>
holy shit my sig was big!

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Quote from: blueXx
yar.. but any lower than that will make the map name hard to read
i actually want it a little bit longer but allowing the game to keep going with it could be really nice... >>


Got it... done... works...

(I kept forgetting to update the input, so here it is, and it also fades out now. I just forget to update the graphics sometimes.)

Here ya go.

Code: [Select]
class Scene_Title
  #Dubealex Addition (from XRXS) to show Map Name on screen
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end
class Game_Map
#Dubealex Addition (from XRXS) to show Map Name on screen
def name
$map_infos[@map_id]
end
end
class Window_Float_Location < Window_Base
   def initialize(location = '')
      super(0,416,232,64)
      self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = 'Times New Roman'
      self.contents.font.size = 22
      self.opacity = 200
      self.back_opacity = 200
      @location = location
      @wait_count = 200
      show_location
   end
   def show_location
      self.contents.clear
      self.contents.font.color = normal_color
      w = self.contents.width
      h = self.contents.height
      self.contents.draw_text(0,0,w,h,@location,0)
      wait
   end
   def wait
     loop do
       self.update
       $scene.update
       Input.update
       @wait_count -= 1
       if @wait_count == 0
         break
       end
     end
     for i in 1..40
       self.opacity -= 5
       self.back_opacity -= 5
       self.contents_opacity -= 5
       Graphics.update
       $scene.update
       Input.update
     end
     self.dispose
   end
   def update
     Graphics.update
   end
end class Scene_Map
  def transfer_player
    # Clear player place move call flag
    $game_temp.player_transferring = false
    # If move destination is different than current map
    if $game_map.map_id != $game_temp.player_new_map_id
      # Set up a new map
      $game_map.setup($game_temp.player_new_map_id)
    end
    # Set up player position
    $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
    # Set player direction
    case $game_temp.player_new_direction
    when 2  # down
      $game_player.turn_down
    when 4  # left
      $game_player.turn_left
    when 6  # right
      $game_player.turn_right
    when 8  # up
      $game_player.turn_up
    end
    # Straighten player position
    $game_player.straighten
    # Update map (run parallel process event)
    $game_map.update
    # Remake sprite set
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    # If processing transition
    if $game_temp.transition_processing
      # Clear transition processing flag
      $game_temp.transition_processing = false
      # Execute transition
      Graphics.transition(20)
    end
    location = $game_map.name
    float_location = Window_Float_Location.new(location)
    # Run automatic change for BGM and BGS set on the map
    $game_map.autoplay
    # Frame reset
    Graphics.frame_reset
    # Update input information
    Input.update
  end
end
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

***
Rep:
Level 90
YOU ARE A GOD! lol This is perfect thank you
Quote
Zxmelee says: I FUCKED A CHICK GEEZ
Neko says: I doubt it was a girl
Neko says: Was "she" working the corners?
Zxmelee says: Well, I was lying...
Zxmelee says: but, oh man. They were all over me
Neko says: With a few bucks
Neko says: That hapens

Pwnzorz'd

******
Rep:
Level 91
well done tsu
holy shit my sig was big!

*****
Rep:
Level 91
Thanks For Coming
Nice scripts  :P

This could be very useful.

Does it work?

***
Rep:
Level 90
It works great!!!I think I'm going to shorten the time that the window is up though.. its up for like 5 seconds or somthing but nobugs from what Ive seen so far =]
Quote
Zxmelee says: I FUCKED A CHICK GEEZ
Neko says: I doubt it was a girl
Neko says: Was "she" working the corners?
Zxmelee says: Well, I was lying...
Zxmelee says: but, oh man. They were all over me
Neko says: With a few bucks
Neko says: That hapens

Pwnzorz'd

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Quote from: Neko
It works great!!!I think I'm going to shorten the time that the window is up though.. its up for like 5 seconds or somthing but nobugs from what Ive seen so far =]


*cough* there's only one, but it wont happen unless you go to a different map before the window goes away.

(it simply layers)
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

***
Rep:
Level 90
Can you like put a line or two that erases it when changed???
Quote
Zxmelee says: I FUCKED A CHICK GEEZ
Neko says: I doubt it was a girl
Neko says: Was "she" working the corners?
Zxmelee says: Well, I was lying...
Zxmelee says: but, oh man. They were all over me
Neko says: With a few bucks
Neko says: That hapens

Pwnzorz'd

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
I found another bug. If you enter a map, the BGM of the new map won
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!