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
   Actor Voices by diamondandplatinum3, note-tag commands not working! Starmage 1 249 08-04-2025, 09:02 AM
Last Post: Starmage
   Personal graph by actor zlsl 4 7,724 10-23-2021, 06:43 AM
Last Post: zlsl
   Multi Attack & Combo Display Keeroh 9 17,400 05-15-2017, 06:39 PM
Last Post: DerVVulfman
   Actor names in Quest Script jreagan406 5 11,255 03-07-2017, 08:06 AM
Last Post: JayRay
   [XP]Alternative Attack Algorithms by Xelias - need help with bug Geminil 0 4,312 02-06-2016, 07:56 PM
Last Post: Geminil
   Actor Graphic/Reflection Refuses to Update/Refresh penguwin 6 12,168 11-06-2014, 09:51 PM
Last Post: penguwin
   Enemy Transform w/ Minkoff Animated Battlers Kain Nobel 1 5,181 06-01-2014, 05:41 PM
Last Post: MechanicalPen
   Modifying Actor ID to Class ID for Advanced Individual Battle Commands Script NewHope 1 5,763 07-11-2012, 11:37 PM
Last Post: NewHope
   Repositioning the actor command window. MegaPowerNinja 4 11,147 04-12-2011, 05:21 AM
Last Post: MegaPowerNinja
   [RMXP] Actor Cloning dagarath 2 10,718 03-08-2011, 07:18 AM
Last Post: dagarath



Users browsing this thread: 1 Guest(s)