Attack from an enemy to a actor as condinitional branch
#3
The enemy troop is a whole group of enemies, be it 1 or 8. Are you looking for a way to make a switch be turned on if player ID 17 is attacked by any enemy from Troop #1 ?

Sorta like?
Code:
if $game_troop.id == 1  #There's no such ID right now.
  for enemy in $game_troop.enemies
    target = enemy.target
    if target.is_a?(Game_Actor)
      $game_switches[4] = true if target.id == 17
    end
  end
end

This code is clearly conjecture, but is this what you're striving for? You cannot just make it in the script call of the Troops section. More likely, you'd need to add this into the Game_Battler class as well as a simple addition to the Scene_Battle system.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Messages In This Thread
RE: Attack from an enemy to a actor as condinitional branch - by DerVVulfman - 07-02-2014, 04:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Personal graph by actor zlsl 4 4,968 10-23-2021, 06:43 AM
Last Post: zlsl
   Multi Attack & Combo Display Keeroh 9 13,977 05-15-2017, 06:39 PM
Last Post: DerVVulfman
   Actor names in Quest Script jreagan406 5 8,640 03-07-2017, 08:06 AM
Last Post: JayRay
   [XP]Alternative Attack Algorithms by Xelias - need help with bug Geminil 0 3,219 02-06-2016, 07:56 PM
Last Post: Geminil
   Actor Graphic/Reflection Refuses to Update/Refresh penguwin 6 9,809 11-06-2014, 09:51 PM
Last Post: penguwin
   Enemy Transform w/ Minkoff Animated Battlers Kain Nobel 1 4,170 06-01-2014, 05:41 PM
Last Post: MechanicalPen
   Modifying Actor ID to Class ID for Advanced Individual Battle Commands Script NewHope 1 4,631 07-11-2012, 11:37 PM
Last Post: NewHope
   Repositioning the actor command window. MegaPowerNinja 4 9,391 04-12-2011, 05:21 AM
Last Post: MegaPowerNinja
   [RMXP] Actor Cloning dagarath 2 9,174 03-08-2011, 07:18 AM
Last Post: dagarath
   Ring Menu + Actor Train? Other party members dissapear... Shadowgaz 2 6,339 05-19-2009, 01:35 PM
Last Post: Shadowgaz



Users browsing this thread: 3 Guest(s)