Author Topic: General RGSS/RGSS2/RGSS3 Help  (Read 106796 times)

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #40 on: March 20, 2009, 10:34:50 PM »
Here's a tip:

Look in the Scene_Map class. You'll find a variable for events there. Find out what class is being stored there.
Next, go find either a) that class's source in the scripts or b) that class's documentation in the help file.
Finally, look for something with 'x' in it.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #41 on: March 23, 2009, 06:17:31 AM »
Gots a new question I am making a status menu for my ABS Arcade game and I want the enemies to be animated in the menu so it looks like they are walking in place. How would I go doing this?

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #42 on: March 23, 2009, 01:36:11 PM »
Use sprites and link them to the window as needed. For example, window.visible=false will also do sprite.visible = false. Check out STCMS and see how Blizz did it. That, or you could constantly use contents.blt to paste the graphic, which I don't recommend (but I mentioned this cause it might be considerable).
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #43 on: March 24, 2009, 08:58:59 PM »
I didnt quite get it working  :^_^': But anyways new question :P Of course :)
How do I transfer a player using script call?

Offline shdwlink1993

  • Ethereal Devastator
  • ****
  • Posts: 435
  • LV: 63
  • Gender: Male
    • View Profile
    • YouTube Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #44 on: March 24, 2009, 09:17:08 PM »
You'd use:

Code: [Select]
$game_temp.player_new_map_id = <<New Map>>
$game_temp.player_new_x = <<New X>>
$game_temp.player_new_y = <<New Y>>
$game_temp.player_new_direction = <<New Direction to face>>
$scene.transfer_player

while on the map.
Stuff I've made:

(click to show/hide)

"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #45 on: March 28, 2009, 12:11:11 AM »
Another question :^_^':
I have something setup for a font changing size and and font changer. My script does what its supposed to do. This is the part thats not working I have the class game_system set up heres my script can someone help please?
Code: [Select]
class Game_System
  attr_accessor :font                    # font
  attr_accessor :size                    # size
  alias re_init initialize
  def initialize
    @font = "Arial"
    @size = 20
    re_init
  end
end

class Font
  alias change_font initialize
  def initialize
    change_font
    self.name = $game_system.font
    self.size = $game_system.size
  end
end

When I use $game_system.font = "Arial Black" it doesnt work. the $game_system.size = 10 doesnt work eitehr can someone help?
« Last Edit: March 29, 2009, 01:41:34 AM by game_guy »

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #46 on: March 29, 2009, 06:46:26 AM »
Another question :^_^':
I have something setup for a font changing size and and font changer. My script does what its supposed to do. This is the part thats not working I have the class game_system set up heres my script can someone help please?
Code: [Select]
class Game_System
  attr_accessor :font                    # font
  attr_accessor :size                    # size
  alias re_init initialize
  def initialize
    @font = "Arial"
    @size = 20
    re_init
  end
end

class Font
  alias change_font initialize
  def initialize
    change_font
    self.name = $game_system.font
    self.size = $game_system.size
  end
end

When I use $game_system.font = "Arial Black" it doesnt work. the $game_system.size = 10 doesnt work eitehr can someone help?

*bumps*

Offline Landith

  • Astral Trancist
  • *****
  • Posts: 947
  • LV: 59
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #47 on: March 29, 2009, 08:21:29 AM »
Make the class font part to module font and try calling it with change_font, after you set the $game_system.font = "Arial Black"

So like an example would be:

Code: [Select]
$game_system.font = "Arial Black"
change_font

and your code would be

Code: [Select]
class Game_System
  attr_accessor :font                    # font
  attr_accessor :size                    # size
  alias re_init initialize
  def initialize
    @font = "Arial"
    @size = 20
    re_init
  end
end

module Font
  alias change_font initialize
  def initialize
    change_font
    self.name = $game_system.font
    self.size = $game_system.size
  end
end

You can try that.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19905
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #48 on: March 29, 2009, 02:41:22 PM »
I suggest you rather use something like my Ultimate Font Override.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #49 on: March 29, 2009, 06:18:53 PM »
I suggest you rather use something like my Ultimate Font Override.

Normally I would but this isn't for changing the font :P
I'm trying to learn to be a better scripter. More knowledge of RGSS the better.

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #50 on: March 30, 2009, 05:30:58 PM »
You could learn from Ultimate Font Override, if not use it. I did the same. But in the end, my version came out pretty much the same.

PS: btw, doesn't Font#initialize have arguments? Shouldn't it be like:

Code: [Select]
alias re_init initialize
def initialize(*args)
  #stuff
  re_init(args)
end

*args will simply pass all the given arguments to the aliases method. You use this when you're not sure about the number of arguments or you don't want to handle them again when you don't need to.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #51 on: March 31, 2009, 05:54:27 AM »
How do we cut image script wise. I seen it in Berans Ipod Script.


I want to be able to cut that up in a script so I can use it or something. But how would I go like "cutting" it up like make it display only one section of the image?

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #52 on: April 04, 2009, 03:20:47 PM »
How do we cut image script wise. I seen it in Berans Ipod Script.


I want to be able to cut that up in a script so I can use it or something. But how would I go like "cutting" it up like make it display only one section of the image?
*bump*

It is a whole image. All the numbers are put together.

Offline shdwlink1993

  • Ethereal Devastator
  • ****
  • Posts: 435
  • LV: 63
  • Gender: Male
    • View Profile
    • YouTube Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #53 on: April 05, 2009, 05:47:01 AM »
Something like this would work (I think):

Code: [Select]
self.bitmap = RPG::Cache.picture('Numbers', 0)
self.ox = bitmap.width / 10
self.oy = bitmap.height
Stuff I've made:

(click to show/hide)

"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #54 on: April 05, 2009, 10:41:39 AM »
That won't cut the image, it'll only set the ox. For cutting the image, you'd need self.src_rect.set(x, y, w, h). Check it out in Arrow_Actor class, see how it selects the cursor parts from the windowskin.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #55 on: April 05, 2009, 02:14:03 PM »
Wow, now that is a handy thing I did not know. <333

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #56 on: April 09, 2009, 03:22:04 AM »
I need some major help and it involves my new script with the background changer. I am so stuck on this and can't figure it out.
Here's my script.
Code: [Select]
module GameGuy
  Tilesets_Apply          = [1]
  Terrain1                = "001-Grassland01"
  Terrain2                = "002-Woods01"
  Terrain3                = "003-Forest01"
  Terrain4                = "004-Mountain01"
  Terrain5                = "004-Mountain01"
  Terrain6                = "004-Mountain01"
  Terrain7                = "004-Mountain01"
end
class Scene_Map
  alias re_update update
  def update
    re_update
    if GameGuy::Tilesets_Apply.include?($data_tilesets[$game_map.tileset_name])
      if $game_map.terrain_tag($game_player.x, $game_player.y) == 1
        $game_map.battleback_name = GameGuy::Terrain1
      elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 2
        $game_map.battleback_name = GameGuy::Terrain2
      elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 3
        $game_map.battleback_name = GameGuy::Terrain3
      elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 4
        $game_map.battleback_name = GameGuy::Terrain4
      elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 5
        $game_map.battleback_name = GameGuy::Terrain5
      elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 6
        $game_map.battleback_name = GameGuy::Terrain6
      elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 7
        $game_map.battleback_name = GameGuy::Terrain7
      end
    end
  end
end

Its an unreleased non working version. Anyways I want to make it so you have to enter the tileset id's in the
Tilesets_Apply so that the background changer only works on the tileset id's you entered in there
but I am having troubles getting to that.

Please someone help :(

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #57 on: April 09, 2009, 11:44:29 AM »
Code: [Select]
Tilesets_Apply          = [1]
Code: [Select]
if GameGuy::Tilesets_Apply.include?($data_tilesets[$game_map.tileset_name])
I'm not sure, but I don't think $data_tilesets[$game_map.tileset_name] is a number, it has to be one of those RPG:: objects. Try checking that out. If that IS the case, something like this might work:
if GameGuy::Tilesets_Apply.include?($data_tilesets[$game_map.tileset_name].id)

PS: This is all off my head, there is every chance I could be wrong.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline nathmatt

  • Chaos User
  • ******
  • Posts: 1289
  • LV: 114
  • Gender: Male
  • The Add_on King
    • View Profile
    • Nathmatt Productions
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #58 on: April 09, 2009, 03:53:13 PM »
actually this works tested

(click to show/hide)
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script
(click to show/hide)

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: General RGSS/RGSS2/RGSS3 Help
« Reply #59 on: April 09, 2009, 05:49:19 PM »
lol nathmatt! I only made things complicated >.< *powers up*
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews