Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> .note, Need general help with setting up a one for States, Like PoisonDMG =
Titanhex
post Feb 6 2012, 02:27 PM
Post #1


Guru of Water
Group Icon

Group: Revolutionary
Posts: 1,096
Type: None
RM Skill: Masterful
Rev Points: 5




Alright I want to use the .note of a State so that I can read some values from it.

Particularly, I want it so if the string Slip DMG = is in the note it uses the value after Slip DMG =. This isn't mentioned in dah0rst's tutorial, so I came here to ask how I'd do it. How would I go about something like this?

I want it to be used in Game_Battler class, since that contains this:

CODE
  def slip_damage_effect
    if slip_damage? and @hp > 0
      @hp_damage = apply_variance(maxhp / 10, 10)
      @hp_damage = @hp - 1 if @hp_damage >= @hp
      self.hp -= @hp_damage
    end
  end


I constructed this snippet from reference and for the most part understand it:


CODE
      $data_states[].note.each_line { |line|
      slip_amount = line.gsub('Slip DMG = ', '').chomp.to_i if line.include?('Slip DMG = ')
      }


Unfortunately I don't know how to get the number of the state causing the slip damage.


__________________________
Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 17th June 2013 - 08:33 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker