Functions:
- defines a "trigger"-troop which activates the script when the battle starts
- defines which troops appear when the script has been activated
- turn the script off by using switches
CODE
module ENE
Mi_Troop = {
#Example
1 => 3 # a => b a = "trigger-troop" b = the following troops which shall appear (in the example troop 1 to troop 3) *look at the picture
}
SwitchTroopOff = 1 #with that switch you (de)aktivate the script (false/off = script activated)
end
Unbenannt.png ( 113.77K )
Number of downloads: 21Copy that and paste it above main
CODE
def setup(troop_id)
if ENE::Mi_Troop.has_key?(troop_id) and $game_switches[ENE::SwitchTroopOff] == false
t_id = (rand(ENE::Mi_Troop[troop_id]) + troop_id)
else
t_id = troop_id
end
# Set array of enemies who are set as troops
@enemies = []
troop = $data_troops[t_id]
for i in 0...troop.members.size
enemy = $data_enemies[troop.members[i].enemy_id]
if enemy != nil
@enemies.push(Game_Enemy.new(t_id, i))
end
end
end
This you have to copy and replace it in Game_Troops with the method "setup(troop_id)" on line 41.
-------------------------------------------
Thats my first little selfmade "scrpt" i'm posting here and i know, my description is very bad. Thats because im from swiss and therefore im not so good in english.
Plz comment if you have any questions or you like it (or dont like it.)