General RGSS/RGSS2/RGSS3 Help

Started by G_G, March 04, 2009, 12:14:28 am

Previous topic - Next topic

Fantasist

Change the @column_max variable to @item_max in Window_Selectable. You might have to tinker with update_cursor_rect.
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




G_G

March 14, 2009, 09:14:07 am #21 Last Edit: March 14, 2009, 09:21:15 am by game_guy
Thanks fantasist now I can make my cms I had in mind.
Okay it works but I still dont know how to lay the choices together.
Instead of
Items
Skills
Etc.

I want this but I dont know how to do this
Items Skills Etc.

The window selectable thing works but I started up title screen and it showed all three options the same but the selection was different.

winkio

you need to change the dimensions of the window (in the constructor, where it says 'def initialize), then change draw_item.  Or whatever that method is called.

G_G

March 14, 2009, 09:55:26 am #23 Last Edit: March 14, 2009, 12:44:53 pm by game_guy
Well I still dont know exactly what to change. I tried changing a few things just now but it started only showing the New Game option. So then I changed it back.

EDIT: Okay I just made a new window based off of ShopCommand so I got it now.

G_G

New question:
is it possible to have a message thing have to use more than one letter? Like the name thing is \n[1] but I need to know if its possible to have something like \sd[1] and if so how?

winkio

yes.  Just search for the string like you would any other.

G_G

well I wouldnt know what to do. I had the thing setup in the code like this
[SDsd] but that didnt work and I wouldnt know what else to try.

winkio

its in Blizz-ABS.  here, let me find it...

event.name.clone.gsub!('\spc') {''}


thats how it looks through event names in blizzabs.

For messages, replace event.name with whatever you get the message text from.

G_G

It doesnt work :( heres the code I have
Spoiler: ShowHide
class Window_Message < Window_Selectable
  alias message_system_later refresh
  def refresh
    if $game_temp.message_text != nil
      text = $game_temp.message_text
      # Everything related to Actors
      text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
      end
      # Everything related to Skills
      text.gsub!(/\\[Ss]\[([0-9]+)\]/) do
        $data_skills[$1.to_i] != nil ? $data_skills[$1.to_i].name : ""
      end
      text.gsub!(/\\[Ii]\[([0-9]+)\]/) do
        $data_items[$1.to_i] != nil ? $data_items[$1.to_i].name : ""
      end
      text.gsub!(/\\[Aa]\[([0-9]+)\]/) do
        $data_armors[$1.to_i] != nil ? $data_armors[$1.to_i].name : ""
      end
      text.gsub!(/\\[Ww]\[([0-9]+)\]/) do
        $data_weapons[$1.to_i] != nil ? $data_weapons[$1.to_i].name : ""
      end
      text.gsub!(/\\[Ee]\[([0-9]+)\]/) do
        $data_enemies[$1.to_i] != nil ? $data_enemies[$1.to_i].name : ""
      end
      text.gsub!('\ah') {$game_actors[$1.to_i].hp}
      text.gsub!('\amh') {$game_actors[$1.to_i].maxhp}
    end
    message_system_later
  end
end

Blizzard

That's for "\spc", not for "[spc]".
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

G_G

What do you mean its for "\spc"?

fugibo

Two things:

1) He meant that it checked the event's name for \spc, not [spc].

2) I'm fairly sure you can just use

event.name.gsub('[spc]') do '' end

Since regular gsub copies on its own 0_o

G_G

I dont want to see what an events name is its for a message system. The message system uses this \n[1] to display a name. I want this
\ah[1] to display Game_actor 1's hp.

shdwlink1993

Like this?

text.gsub!(/\\[Aa][Hh]\[([0-9]+)\]/) { $game_actors[$1.to_i].hp.to_s }
Stuff I've made:




"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."

G_G

Will that work? I'll try it once rpg maker xp is re-installed.

fugibo

Good luck. And yes, that will almost definitely work just by glancing at the code.

G_G

YES IT WORKS FINALLY!!!! I've been trying to get it to work forever thank you shdwlink!! *powers up*

G_G

Another question  :^_^':
How do we check an events x or y coordinate through script call?

Landith

$game_map.events[@event_id].x

$game_map.events[@event_id].y

I think... :/

G_G