Hmm.. I believe what you mean with erasing is I have to erase one of those color in windowskin using a graphic software like photoshop? Then use it so I have the transparent color, and the outline is already there. What about the change_color(id, enabled = true) if I change enabled to false will it transparent? I know I must change the value of translucent alpha too or make a new method to pass a value, but is that will work?
One last thing, Actually I try to mess with title command menu text, so what I want to know where should I put the change_color method? Sorry if this too much, but all this learning is really a great jump for me in studying the window thing.
Thanks shaz.
Uh yeah as you expected the outline is not there, wew.. But thanks for helping 'till now shaz, I think I'll give up for now.. 😛
You'll have to go with changing the windowskin and removing a colour not needed.
Haha yes I believe that's the best for me,.
Thank you very much shaz.
Does anyone know how to eliminate case statements and use a better way or a substitution to avoid long codes for a simple variable check? For example:
a = ["Hey", "Hello", "Hi", "Yow", "Supp?"]x = rand(5) + 1case x when 1 p a[0] when 2 p a[1] when 3 p a[2] when 4 p a[3] when 5 p a[4]endIs there a way to shorten the codes or a better way of doing such without using too many if statements or a long case statements especially if you're dealing with like 100 variables or something that changes over time?
like this?
a = ["Hey", "Hello", "Hi", "Yow", "Supp?"]return a[ (rand(5) + 1) - 1 ]Edit:
Or this...
return ["Hey", "Hello", "Hi", "Yow", "Supp?"].sampleI prefer that one for gaining a random array item.
Really it depends on what your wanting it to do though...
Why don't you just attach a common event to the item instead of doing it via script?
Not as easy, but it can be shortened slightly (and probably more than this).
class Game_Battler < Game_BattlerBase alias hf_item_apply item_apply def item_apply(user, item) hf_item_apply(user, item) return unless user.is_a?(Game_Actor) return unless user.id == item.id process_unique_item_thing(user.id) end def process_unique_item_thing(id) case id when 1 then $game_party.gain_gold(999) when 2 then $game_party.lose_gold(100) end endendRealistically though, if each user has multiple unique item effects then there is no way around it, your code is gonna be long.
Edit:
That never really shortened the original method, but it made it much easier to customize the new method.
I see. That's a lot of help. One more thing, what does that inject means in arrays?
Hey I don't know but I need to back here again, and now with more silly question, is that posibble to draw text vertically? Let's say I want to draw "BLIZZARD ADVENTURE! I want it to be like this:
BL AI DZ VZ EA NR TD U R ENow if you wondering if that's a game title, No because if it's a game title I prefer to draw it in my background. Well I'm just curious, if this can be done or not via script. Well the point is I make a big window, then put draw_text_ex(x, y, text). But text here must be configurated(pr what do I say it?) with some code to alter the horizontal text into a vertical position(especialy if the text will be splited into two like my ilustration).
I tried to make a code to do this, but no work,and actually my head is almost explode. I mess with array of the character, make an if statement, for and while loop but the logic is not come to my mind. Perhaps the master here happen to ever make this kind thing? Or maybe someone can help me to point out the logic to do this, or even know how to make this ?
Thanks all. Peace.
@HeartFire:
Take Dekita's code and try to write out each block evaulation step for us to see.
there should be something there that increases the horizontal position per letter, so you just need to find it and adjust it so that it works vertically instead of horizontally