[Resolved]Wierd thing o.O

Started by Tazero, December 08, 2008, 07:46:26 pm

Previous topic - Next topic

Tazero

December 08, 2008, 07:46:26 pm Last Edit: December 10, 2008, 04:26:28 pm by Taharo
Any Wayz wondering if it's possible to name an object that you pick with auto detect.
Such as You open a treasure chest a random item is in there it automaticly says Wow you just got _____ What a pleasant suprise!
And the characters name gets annaounced under variable X Bler blah blee blue....


If you were a fish...

Blizzard

You can do it with a common event and conditional branching. Or with a script that interprets additional commands besides \n, \v and \c.
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.

Kagutsuchi


Fantasist

Here's something I cooked up:

#=============================================================================
# ** Item gain prompt
#----------------------------------------------------------------------------
# by Fantasist
# Version: 0.1
# Date: 11-Dec-2008
#----------------------------------------------------------------------------
# Version History:
#
#    0.1 - The very first expermental version
#----------------------------------------------------------------------------
# IMPORTANT: THIS IS NOT A PUBLIC RELEASE! Use it at your own risk.
#                   Requested by Taharo
#=============================================================================

#=============================================================================
# ** Interpreter
#=============================================================================

class Interpreter
 
  def invoke_message(text)
    @message_waiting = true
    $game_temp.message_proc = Proc.new { @message_waiting = false }
    $game_temp.message_text = text
  end
 
  alias item_cmd_126 command_126
  def command_126
    t1 = @parameters[1] == 0 ? 'Obtained' : 'Lost'
    t2 = @parameters[2] == 0 ? @parameters[3] : $game_variables[@parameters[3]]
    t3 = $data_items[@parameters[0]].name
    text = "#{t1} #{t2} x #{t3}"
    invoke_message(text)
    item_cmd_126
  end
 
  alias item_cmd_127 command_127
  def command_127
    t1 = @parameters[1] == 0 ? 'Obtained' : 'Lost'
    t2 = @parameters[2] == 0 ? @parameters[3] : $game_variables[@parameters[3]]
    t3 = $data_weapons[@parameters[0]].name
    text = "#{t1} #{t2} x #{t3}"
    invoke_message(text)
    item_cmd_127
  end
 
  alias item_cmd_128 command_128
  def command_128
    t1 = @parameters[1] == 0 ? 'Obtained' : 'Lost'
    t2 = @parameters[2] == 0 ? @parameters[3] : $game_variables[@parameters[3]]
    t3 = $data_armors[@parameters[0]].name
    text = "#{t1} #{t2} x #{t3}"
    invoke_message(text)
    item_cmd_128
  end
 
end


Paste it below Scene_Debug. Now make an event and try adding or removing items/weapons/armors. Let me know if you like it.
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




Tazero

Ty Fantasist :)   i suck at coding don't know even 1 line other than true false  :^_^':   :<_<:


If you were a fish...

Fantasist

Wait, you're totally happy with that? Cause I think showing all the items at a time is better than showing each item seperately. Oh well, whatever makes you happy :) (btw, I don'y (yet) know how to code what I just described -_-)
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