What's up, RMers?
I hope this helps. Right now, this script has the first map set to just put damage on two areas of tiles. Yep, map coordinates CAN overlap without accidentally causing double damage.

Code:
#==============================================================================
# ** Map Coordinate Slip Damage
#------------------------------------------------------------------------------
#  by your Friendly Neighborhood Werewolf (aka DerVVulfman)
#------------------------------------------------------------------------------
#
#  This lets you create a set of coordinates within a map that performs slip
#  damage separate from the normal 'status ailment' created damage.
#
#  NOTE:  Slip Damage is based on the character's Max HP, subtracting 1% of
#         their max HP every step.... set on line 58.
#         If you want to have actor HP reduced by a flat 10HP each step, just
#         set line 58 to:   actor.hp -= 10
#
#==============================================================================

module MapCoordSlip

  # -------------------------------------------------------------------------
  MAP = {}  # Do Not Touch
  # -------------------------------------------------------------------------
  
  # MAP ARRAY
  #
    MAP[1]      = [
                    [3,3,16,11],  # Sets an area from (3,3) to (16,20)
                    [2,5,2,15]    # Sets an area from (2,5) to (2,15)
                  ]
end

#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  This class handles the party. It includes information on amount of gold
#  and items. Refer to "$game_party" for the instance of this class.
#==============================================================================

class Game_Party
  #--------------------------------------------------------------------------
  # * Slip Damage Check (for map)
  #--------------------------------------------------------------------------
  def extra_slip_damage
    # Get the map coord list for that map
    return unless MapCoordSlip::MAP.has_key?($game_map.map_id)
    # Create list of array coordinates
    coord_list = []
    coord_list = MapCoordSlip::MAP[$game_map.map_id]
    # Cycle through map coordinates for map
    for coord in coord_list
      # If the player is in matching coordinates
      if ($game_player.x).between?(coord[0],coord[2]) &&
        ($game_player.y).between?(coord[1],coord[3])
        # Cycle through actors
        for actor in @actors
          # As long as actor has HP
          if actor.hp > 0
            # Apply Slip Damage
            actor.hp -= [actor.maxhp / 100, 1].max
            # If Actor HP reaches 0
            if actor.hp == 0
              # Perform Collapse
              $game_system.se_play($data_system.actor_collapse_se)
            end
            # Flash
            $game_screen.start_flash(Color.new(255,0,0,128), 4)
            # Got to game over if all dead
            $game_temp.gameover = $game_party.all_dead?
          end
        end
        # Exit as player was in area and damage was applied
        return
      end
    end
  end
end



#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
#  This class handles the player. Its functions include event starting
#  determinants and map scrolling. Refer to "$game_player" for the one
#  instance of this class.
#==============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Increaase Steps
  #--------------------------------------------------------------------------
  alias waahaa increase_steps
  def increase_steps
    waahaa
    # If move route is not forcing
    $game_party.extra_slip_damage unless @move_route_forcing
  end
end
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
Thanks, but where am I supposed to put that? I figured out where to put it.

Also two things: 1) I planned on the character having a red glow animation [as opposed to the whole screen being red] every second or so to show that the player is taking damage [It would do the same kind of thing for other kinds of environment damage like cold and desert heat] and 2) the titles should also deal damage even as the player just stands on it.
"Turning iron ore into iron swords is a hard process, for one must first dig out the rock, and melt it to refine it, then one must pour that metal into a mould, let it cool a bit, and pound on it while it cools even further. Games are no different." - Ahzoh

Universal Declaration of Human Rights in Vrkhazhian
ʾEšol ḵavud ʾelẕakud lav ʾezʾaẕud zwazaršeru ya lit žalneru lav lit t͛enud. Ṗal sa-ražheru lav raržižu paplam lav ṗal widsaṟam bemaḵu šuku lit ʾeyṭu waẏnilaẇ.
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Reply }
That script can just go between Scene_Debug and Main, and it was designed to apply extra slip damage when you take a step within set coordinates. In there, you set one or more rectangle areas [ x1, y1, x2, y2 ] for each map you wanted to have slip damage.

But it appears you want something different. Your damage is based on applying damage to the player/party in timed increments. That is a little different, but not impossible.

No time right now... Tomorrow mebby?
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
Well, have you played or watched Metroid Prime Echoes?
"Turning iron ore into iron swords is a hard process, for one must first dig out the rock, and melt it to refine it, then one must pour that metal into a mould, let it cool a bit, and pound on it while it cools even further. Games are no different." - Ahzoh

Universal Declaration of Human Rights in Vrkhazhian
ʾEšol ḵavud ʾelẕakud lav ʾezʾaẕud zwazaršeru ya lit žalneru lav lit t͛enud. Ṗal sa-ražheru lav raržižu paplam lav ṗal widsaṟam bemaḵu šuku lit ʾeyṭu waẏnilaẇ.
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Reply }
Nope. But I understand the premise of standing around while your character's life drains away. I do have a script that does that, but it covers a whole map, not a tile area from (X,Y) to (X,Y).
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
(09-14-2016, 04:57 AM)DerVVulfman Wrote: Nope.  But I understand the premise of standing around while your character's life drains away.  I do have a script that does that, but it covers a whole map, not a tile area from (X,Y) to (X,Y).

In Metroid Prime Echoes, while all of Dark Aether will drain your hp over time, there are little "safespots" where your hp is not drained.
"Turning iron ore into iron swords is a hard process, for one must first dig out the rock, and melt it to refine it, then one must pour that metal into a mould, let it cool a bit, and pound on it while it cools even further. Games are no different." - Ahzoh

Universal Declaration of Human Rights in Vrkhazhian
ʾEšol ḵavud ʾelẕakud lav ʾezʾaẕud zwazaršeru ya lit žalneru lav lit t͛enud. Ṗal sa-ražheru lav raržižu paplam lav ṗal widsaṟam bemaḵu šuku lit ʾeyṭu waẏnilaẇ.
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Reply }
I've made a little event system for that. You only need 1 switch and 1 event for each savezone.
Try it out: http://www.file-upload.net/download-1193...s.rar.html

It will only work with rectangular zones right now.
Reply }
Thanks, this is what I am looking for, although it seems to stop when players reach 1 health. Also, quadratic zones?
"Turning iron ore into iron swords is a hard process, for one must first dig out the rock, and melt it to refine it, then one must pour that metal into a mould, let it cool a bit, and pound on it while it cools even further. Games are no different." - Ahzoh

Universal Declaration of Human Rights in Vrkhazhian
ʾEšol ḵavud ʾelẕakud lav ʾezʾaẕud zwazaršeru ya lit žalneru lav lit t͛enud. Ṗal sa-ražheru lav raržižu paplam lav ṗal widsaṟam bemaḵu šuku lit ʾeyṭu waẏnilaẇ.
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Reply }
I edited it to rectangular. The savezone couldn't look like this:

[Image: sample3elhpdnw6s.png]

Would need a more complicated configuration.

Edit:That event command can't turn on the game over sequence. But you can allow it to drop to 0 health, i think.
For a game over you would need an additional parallel process event.
Reply }
It also seems to stop at 1 hp.
"Turning iron ore into iron swords is a hard process, for one must first dig out the rock, and melt it to refine it, then one must pour that metal into a mould, let it cool a bit, and pound on it while it cools even further. Games are no different." - Ahzoh

Universal Declaration of Human Rights in Vrkhazhian
ʾEšol ḵavud ʾelẕakud lav ʾezʾaẕud zwazaršeru ya lit žalneru lav lit t͛enud. Ṗal sa-ražheru lav raržižu paplam lav ṗal widsaṟam bemaḵu šuku lit ʾeyṭu waẏnilaẇ.
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Reply }




Users browsing this thread: 52 Guest(s)