Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RMVX Request] Unique Enemy Defeat Message for DBS

Hello, and thank you for taking the time to look at my request.

What I am looking for in a script is the ability to give each enemy a different message to relay to a player upon defeating them.
What I am talking about exactly is this:

http://img90.imageshack.us/img90/9590/requestdq2.jpg[/img]

I would like the script to allow you to give a different defeat message for each enemy, via the enemy id, if possible.

For example,

" The Badlands Zombie A fell to pieces."
" The Pathetic Slime B melted away."
" The Crazy Old Man returned to normal."

Thank you in advanced for any and all assistance.
 
Question.

Can I do this the easy way so that it's just a new thing when they die

OR

the hard way were I have to set up a meaningless array so that you can enter in a different message for each enemy.

it's not too hard to do ether one. I'm just busy =D.
 
this should work:
Code:
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base

  #--------------------------------------------------------------------------
  # * Show Added State
  #	 target : Target
  #	 obj	: Skill or item
  #--------------------------------------------------------------------------
  def display_added_states(target, obj = nil)
	for state in target.added_states
	  if target.actor?
		next if state.message1.empty?
		text = target.name + state.message1
	  else
		next if state.message2.empty?
		if state.id == 1					  # Incapacitated
		  message_text = state.message2	   # Default death message
		  case target.enemy_id
		  when 1 # enemy 1 custom message
			message_text = " fell to pieces!"
		  when 2 # enemy 2 custom message
			message_text = " melted away!"
		  when 3 # enemy 3 custom message
			message_text = " returned to normal!"
		  end
		  text = target.name + message_text
		else
		  text = target.name + state.message2
		end
	  end
	  if state.id == 1					  # Incapacitated
		target.perform_collapse
	  end
	  @message_window.replace_instant_text(text)
	  wait(20)
	end
  end
end

just add more messages for other enemies (by ID)
i put in a couple of your suggested messages for testing purposes, feel free to change them
 
originalwij":2y013czy said:
this should work:
Code:
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base

  #--------------------------------------------------------------------------
  # * Show Added State
  #	 target : Target
  #	 obj	: Skill or item
  #--------------------------------------------------------------------------
  def display_added_states(target, obj = nil)
	for state in target.added_states
	  if target.actor?
		next if state.message1.empty?
		text = target.name + state.message1
	  else
		next if state.message2.empty?
		if state.id == 1					  # Incapacitated
		  message_text = state.message2	   # Default death message
		  case target.enemy_id
		  when 1 # enemy 1 custom message
			message_text = " fell to pieces!"
		  when 2 # enemy 2 custom message
			message_text = " melted away!"
		  when 3 # enemy 3 custom message
			message_text = " returned to normal!"
		  end
		  text = target.name + message_text
		else
		  text = target.name + state.message2
		end
	  end
	  if state.id == 1					  # Incapacitated
		target.perform_collapse
	  end
	  @message_window.replace_instant_text(text)
	  wait(20)
	end
  end
end

just add more messages for other enemies (by ID)
i put in a couple of your suggested messages for testing purposes, feel free to change them

Wow nice job man!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top