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.

problem in Dessert Heat

I've been having problem using this script
Have i search for answer? yes but I cant find any
I have already ask this question before I think in www.rmrk.net but it didn't help me
Code:
#===============================================================================
# * Desert Heat (and map regeneration)
#
# By Wyatt, version 1.1
# www.vengeance-rpg.co.nr!
#
# To turn on desert heat change $in_desert to true
# To turn it off again change $in_desert to false
#
# When you enter a desert area, call a script with:
# $desert_left = x
# Where "x" is the amount of steps you want before you start losing health
#
# License:
# It's only a small script, feel free to use in free or commercial games.
# But please give credit.
#
# Updates:
# 1.1 - - Used attr_accessor and aliased methods
#===============================================================================
class Game_Party
  
  # obtain variables
  attr_accessor :in_desert
  attr_accessor :desert_left
  
  # alias methods
  alias desert_steps increase_steps
  alias desert_initialize initialize
  
  # initialize
  def initialize
    desert_initialize
    @desert_left = 250
    @in_desert = false
  end
  
  # increase steps
  def increase_steps
    desert_steps
    # if you are in the desert...
    if @in_desert == true
      if @desert_left > 0
        # drain water
        @desert_left -= 1
        # raise health
        for i in 0...$game_party.actors.size
          $game_party.actors[i].hp += 1 unless $game_party.actors[i].hp ==
          $game_party.actors[i].maxhp
        end
      else
        # drain health (if you have no water left)
        for i in 0...$game_party.actors.size
          $game_party.actors[i].hp -= 3 unless $game_party.actors[i].hp <= 0
          animation = $data_animations[@battler.animation_id]
          animation(animation, @battler.animation_hit)
        end
      end
    else
      # raise health
      for i in 0...$game_party.actors.size
        $game_party.actors[i].hp += 1 unless $game_party.actors[i].hp ==
        $game_party.actors[i].maxhp
      end
    end
  end
end

I don't know how to activate the script
it says use

$desert_left = x

$in_desert to true

how would i use it? when would i use it
and can anyone give me an example?
like " $desert_left = 10 " or sometihng
 
Hmm, been ages since I did that script.

Event command: page 3, bottom right, call script.

Set $desert_left = x

Where x is the number of steps before you run out of water.

Then edit the number 250 in the script to the same number. (where it says @desert_left = 250)
 

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