Troop Reinforcement Battle Events

Thordon123

Veteran
Veteran
Joined
Feb 4, 2018
Messages
52
Reaction score
6
First Language
English
Primarily Uses
RMMV
Hi, sorry if this is the wrong place for this:

I'm using Himeworks Enemy Reinforcement at the moment to try and create a battle system where players fight enemy troops that reinforce as the enemies die. If one slime dies, for example, a skeleton or another slime or whatever will its place until all enemies are defeated. The way I'm trying to achieve this is by creating two troops- the original and the reinforcements- and using two variables:

[7]= Number of enemies alive in the main troop
[8]= Number of enemies alive in the reinforcing troop.

To determine the variables, I'm using these two bits of scripts, for the original and reinforcing troops respectively.
$game_variables[7] = $game_troop.alive_members.select{|mbr| mbr.id==2}.size
$game_variables[8] = $game_troop.alive_members.select{|mbr| mbr.id==2}.size

The line: $game_variables[7] = $game_troop.alive_members.select{|mbr| mbr.id==2}.size is followed by a conditional branch in the main troop's event page, which checks to see if the value of [7] is less than 4 (the max number I want the players fighting at once), AND if the number of troops in the reinforcements is greater than 0. If it IS less than four, and there ARE enemies in the reinforcement troop, then an enemy from the reinforcements is supposed to appear in the battle.

Right now, no reinforcements appear at all. I'm still new to this so if the answer is obvious forgive me, but any help would be appreciated. Thanks!

PS: I also have Himeworks Enemy Events and Enemy Event Reinforcements.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
'Scripts' is where people who have written a script they want to share with others can post it.

[move]RGSSx Script Support[/move]
Please edit your opening post to include links to the web pages where you got those scripts. That way if people need to check something to help you, they don't have to go hunting.
Thanks.
 

Thordon123

Veteran
Veteran
Joined
Feb 4, 2018
Messages
52
Reaction score
6
First Language
English
Primarily Uses
RMMV
Sorry about that, also I've since moved to MV to tackle the problem
 

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,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top