Multiple Enemy Die Variables (Falcoa abs)

Status
Not open for further replies.

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
140
Reaction score
10
First Language
English
Primarily Uses
RMVXA
I want to increase 2 different variables when enemy dies using Falcoa ABS script (https://falcaorgss.wordpress.com/category/pearl-abs-liquid/).

As the moment, if you place, for example, Enemy Die Variable = 40 and then Enemy Die Variable = 45, it only increases variable 40 and ignores any after that. I tried Enemy Die Variable = 40, 45 but that doesn't make any difference.

Is there any way to increase more than one variable in this way, or is that a limitation of the script?

Thanks in advance for any ideas.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
681
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Untested, but give this a try:
Ruby:
class Game_Event < Game_Character
  def run_assigned_commands
    transform = @enemy.enemy.tool_data("Enemy Die Transform = ")
    switch = @enemy.enemy.tool_data("Enemy Die Switch = ", false)
    switch.split(",").each { |s| $game_switches[s.to_i] = true } if switch
    variable = @enemy.enemy.tool_data("Enemy Die Variable = ", false)
    variable.split(",").each { |v| $game_variables[v.to_i] += 1 } if variable
    self_sw = @enemy.enemy.tool_data("Enemy Die Self Switch = ", false)
    #$game_map.event_enemies.delete(self) if @enemy.object
    #$game_map.enemies.delete(@enemy) if @enemy.object
    if self_sw.is_a?(String)
      self_sw.split(",").each { |s| $game_self_switches[[$game_map.map_id, self.id, s]] = true }
      apply_respawn
      $game_map.event_enemies.delete(self)
      $game_map.enemies.delete(@enemy)
      unless $game_system.remain_killed.has_key?($game_map.map_id)
        $game_system.remain_killed[$game_map.map_id] = []
      end
      $game_system.remain_killed[$game_map.map_id].push(self.id) unless
      $game_system.remain_killed[$game_map.map_id].include?(self.id)
      @enemy = nil
    else
      erase unless @deadposee
      respawn = @enemy.enemy.tool_data("Enemy Respawn Seconds = ")
      animation = @enemy.enemy.tool_data("Enemy Respawn Animation = ")
      @respawn_count = respawn * 60 unless respawn.nil?
      @respawn_anim = animation unless animation.nil?
    end
    if transform != nil
      @enemy = Game_Enemy.new(0, transform)
      apply_respawn
    end
  end
end

EDIT: Made a boo boo. Should be good now.
 
Last edited:

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
140
Reaction score
10
First Language
English
Primarily Uses
RMVXA
@A-Moonless-Night Thanks for the reply! Can you give me some more specific instructions such as where I should place the script and if I need to add any values or anything to the script you provided?
I placed the script as-is below the current ABS script and above the bugfix script, and all that happened is that now NEITHER of the variables increase! :D
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
681
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Oops, made a boo boo. I've updated the script in my original post. You should place it below the ABS script.
 

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
140
Reaction score
10
First Language
English
Primarily Uses
RMVXA
Last edited:

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
681
Reaction score
446
First Language
English
Primarily Uses
RMVXA
You should list the variables like so:
Code:
Enemy Die Variable = 40, 45, 20
 

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
140
Reaction score
10
First Language
English
Primarily Uses
RMVXA
Thank you so much – it works now! :D
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top