Hello,
I wanted to know how can we draw icons near commands.Like,
"Icon" Rock
"Icon" Paper
"Icon" Scissors
EDIT : Can you also tell me how to call a variable from an event using a script call ?
Thanks in Advance !
How to draw Icons near commands ?
● ARCHIVED · READ-ONLY
-
-
there's a few scripts that do that.. but my favorite is Fomar's found in a resource pack here.
-
@Venka : I want to do that in my own script.Do you have an alternative way ?
-
oh I see ;) well..
if you look in Window_Base for this def
#-------------------------------------------------------------------------- # * Draw Icon # enabled : Enabled flag. When false, draw semi-transparently. #-------------------------------------------------------------------------- def draw_icon(icon_index, x, y, enabled = true) bitmap = Cache.system("Iconset") rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha) endthat's how you draw icons. Then in your script when you make an command they are actually drawn to the window with the draw_item(index) method.
You'll want to draw an icon for each item and then the item's name. You can look at that method in the Window_ItemList for some reference. It uses draw_item_name that you'll probably need to look up to see how they draw the icon and then the text (in this case the item's name) in your chase you'll want to adjust it for your command's name -
Thanks ! About the variable script call,you have any idea ?
-
I'd need a little bit more information about the variable calling from an event part. But it'd probably be easiest to set the variable to a game variable and then check the game varaible ($game_variables[varID])
So if you set variable 10 to 2923085 and did a script call like
"p $game_variables[10]"
it'd print out the value to the console -> "2923085"
You can set the game variables to anything you want with a script call. If you're setting it in the event itself, it only takes numbers but doing a script call like
Code:$game_variables[10] = "string" # set's the variable to a text string$game_variables[10] = [1, "hey", 3.8] # set's the variable to an array with various info -
Thanks ! I just wanted to make a statistic board.With the numbers of wins,losses,and ties