Giving specific enemies more than one turn [Resolved]

Started by Ryex, June 28, 2009, 08:58:53 pm

Previous topic - Next topic

Ryex

June 28, 2009, 08:58:53 pm Last Edit: July 04, 2009, 12:05:50 pm by Ryexander
so I figure that I can just mod make action orders in scene battle so that it adds the enemy in question more than once like so
 
 #--------------------------------------------------------------------------
 # * Make Action Orders
 #--------------------------------------------------------------------------
 def make_action_orders
   # Initialize @action_battlers array
   @action_battlers = []
   # Add enemy to @action_battlers array
   for enemy in $game_troop.enemies
     if RyexCFG.multi_turn_enemies(enemy.id) != nil
       RyexCFG.multi_turn_enemies(enemy.id).times {
         @action_battlers.push(enemy)
       }
     else
       @action_battlers.push(enemy)
     end
   end
   # Add actor to @action_battlers array
   for actor in $game_party.actors
     @action_battlers.push(actor)
   end
   # Decide action speed for all
   for battler in @action_battlers
     battler.make_action_speed
   end
   # Line up action speed in order from greatest to least
   @action_battlers.sort! {|a,b|
     b.current_action.speed - a.current_action.speed }
 end

where RyexCFG.multi_turn_enemies(id) would return the number of turns the enemy got
but my problem is that the game enemy class only stores one action so i would have to make a new one every action loop my problem is how do I tell if the enemy still has an instance in @action_battlers? can I use

if @action_battlers.include?(@active_battler)
 @active_battler.make_action
end
would that work? or would I need another way.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Ryex

July 03, 2009, 06:10:53 pm #2 Last Edit: July 03, 2009, 07:40:04 pm by Ryexander
Quote from: Ryexander on June 30, 2009, 11:25:18 pm
I would be grateful for any help

also know as a *Bump*

also is there a command that can force a .each loop to go the the next iteration skipping all the code in the loop below the command?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

oh thanks Blizz so next is a command? well I think I found a working way to do my other problem so resolved for now
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />