Calintz's Scripting Questions(Mainly Snippets)

Started by Calintz, February 19, 2009, 02:58:28 am

Previous topic - Next topic

Tazero

The updste shouldn't it be like
gold_window.update if active

Or something along those lines?
And wouldn't you use scene_bler.close/quit/end
or something close to that?


If you were a fish...

Calintz

I'm pretty sure that those are not the proper commands.
**I have already tried to 'refresh,' 'dispose,' and 'remove.' Update might work, but I doubt it.

Tazero

Don't worry though i'm learning too, hqrd as hell isn't it?


If you were a fish...

Calintz

Can be.. .. ..
For the most part, I am beginning to nail everything simple.

I can do what I need to get things the way I want. I just hit some small road blocks sometimes.

Tazero

Alright try this
scene_gold.update else scene_gold.dispose


I'm using my basic knowledge of ruby sorry i can't be of more help


If you were a fish...

Calintz

March 06, 2009, 04:24:22 am #25 Last Edit: March 06, 2009, 04:27:27 am by Calintz16438
That might actually work, hold on.. .. ..let me try.

EDIT
No good...

Jackolas

probably have a idea. but need to get home from work to test it out.
will let you know.

Tazero

Scene_gold.active? else scene_gold.refresh else scene_gold.dispose

?


If you were a fish...

Juan

I'm not sure how you update it from a call script. Heres what  to change the gold window from the window_message class
Spoiler: ShowHide
        # If \G
        if c == "\002"
          # Make gold window
          if @gold_window == nil
            @gold_window = Window_Gold.new
            @gold_window.x = 560 - @gold_window.width
            if $game_temp.in_battle
              [b]@gold_window.y = 192[/b]
            else
              [b]@gold_window.y = self.y >= 128 ? 32 : 384[/b]
            end
            @gold_window.opacity = self.opacity
            @gold_window.back_opacity = self.back_opacity
          end
          # go to next text
          next
        end

Here are the line numbers you change
Spoiler: ShowHide
Line 115 @gold_window.x = 560 - @gold_window.width
# Change the y positon in battle.
Line 117 @gold_window.y = 192
# Change the y depending if the y is less then 128. If goes to 32 if the y is there. Otherwise the y is 382.
Line 119 @gold_window.y = self.y >= 128 ? 32 : 384
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

G_G

Well Calintz the gold window should already be disposing by itself. Okay so you're using the \g command in a message box right? Well then it should dispose it already. Its not going to dispose until the message teh \g command is in is over. But if all failse use this


if  @gold_window.visible
  @gold_window.visible = false
end


or if that doesnt work try


if @gold_window.visible
  @gold_window.dispose
end


All done in a script command even the branch. And yes it should be
@gold_window.dispose


Hopefully you didnt mess up the Window_Message by accident.
So if the above two fails try replacing your current Message_Window with a new one from a new project and see if it still happens.

Calintz

March 06, 2009, 08:53:46 pm #30 Last Edit: March 06, 2009, 08:57:01 pm by Calintz16438
None of this works.
I don't use the gold window from the message box. I am creating a new window with the "Call Script" command. I constantly get a no method error when I use the dispose command.

**Could Ccoa's UMS be causing the issues, but I wouldn't understand why, because I am still using the default syntax.

**This is exactly as the commands appear in my game.

@gold = Window_Gold.new
@gold.x = 416
@gold.y = 288

The window will not dispose though...

I have tried using @gold.dispose and several other commands, but all attempts have failed. I even replaced the default window message script like game_guy suggested.

G_G

March 06, 2009, 08:56:59 pm #31 Last Edit: March 06, 2009, 08:58:07 pm by game_guy
then use
@gold.dispose


Only use
@gold_window.dispose

If you've actually named it @gold_window. And why do that when you can go into Window_Message line 115 and change teh x there and also change teh y and call it from teh message

Calintz

No, no, no!! I have been using
@gold.dispose

G_G

Quote from: game_guy on March 06, 2009, 08:56:59 pm
then use
@gold.dispose


Only use
@gold_window.dispose
[/s]
If you've actually named it @gold_window. And why do that when you can go into Window_Message line 115 and change teh x there and also change teh y and call it from teh message


Use the method thats not strook out then.

Calintz


G_G

Give me ccoa's message system
and I'll alter the gold x and y for you.

I was trying to cross out the code but it didnt work.  But gimme ccoa's message system and the x and y coordinates and I'll alter it for you. Then just use the
\g command.

Calintz

That's okay. I know how to do that.
Thank you...So far, things are working well.. .. ..

Reno-s--Joker

Maybe you've put the dispose command in the wrong spot. But I still suggest you give G_G your script. ^-^

Calintz

I guarantee that I did not put the .dispose command into the wrong place.

This was my exact code.. .. ..

@gold = Window_Gold.new
@gold.x = 416
@gold.y = 288


Upon attempting to update, I tried all of the following:
Spoiler: ShowHide

if @gold.visible
  @gold.dispose
end



if @gold != nil
  @gold.dispose
end



@gold.dispose

**None of the aforementioned succeeded.
**I have everything under control now though.


**Game_Guy = Power Up!!

G_G

game_guy says "So I solved it?" game_guy gets slapped by Ronnie. ronnie says " No duy look at the power up"