Multiple Enemy Die Variables (Falcoa abs)

Status
Not open for further replies.

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
135
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
570
Reaction score
392
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
135
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
570
Reaction score
392
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
135
Reaction score
10
First Language
English
Primarily Uses
RMVXA
Last edited:

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
570
Reaction score
392
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
135
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
6,162
Reaction score
4,297
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

I was planning to release a useless plugin for april fools, but then I thought I let it be.
Tfw every dev around me is using Live2D in their MV games and make me question my skills repeatedly.

Spending the day reworking my maps, especially the first "biome". This time it's not even in the dark. :LZSwink:
Activity on the forums has increased lately, probably because of people staying home. The amount of work for moderators has increased lol.

Forum statistics

Threads
95,522
Messages
929,784
Members
125,791
Latest member
Oersted_LAL
Top