Jump to content

  •  

Photo

FAW Silver Sniper get target of Master


  • Please log in to reply
2 replies to this topic

#1 prism

prism

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 01 December 2016 - 07:25 PM

Does anyone know if this is possible? I want to make it so that FAW Silver Snipers and Magic Decoys will target the same thing as their master. Preferably in the form of the master using a skill say, Provoke or another skill, on the target and the summons will make that their new target. The closest things I can think of are Homuns and those elemental summons Sorcers get where the master can give them a target but that isn't done through a skill.


Edited by prism, 01 December 2016 - 07:37 PM.


#2 Blinzer

Blinzer

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 03 December 2016 - 10:15 AM

it's probably possible by adding 4 or 5 lines of code in front of the code which performs an attack calculation for the player using special "if" conditions to check and rewrite the target of whatever type of class(player,mob,homunculus etc.) silver snipers and decoys are(you might need to add a failsafe if it tries to acquire a target it couldn't hit).

 

alternatively, in a single line you could rewrite the silver sniper/decoy's target by adding a pointer which basically says that your master's last target is your target(and you'd have to run this every single time before each attack), but i don't know how that would end up if that target was out of range so you may need to add a check first which gets the distance between your turret and the monster and also gets your turret's attack range from src and compares them. you also have to refresh it somewhere in between each turret attack somehow even if your character is attacking nothing now, so you might need to create a variable in the memory that remembers the last thing your player character attacked, but you can probably place that within the turret directly.  i'm not capable of doing it myself, only imagining how it would work in computer logic.


Edited by Blinzer, 03 December 2016 - 10:21 AM.


#3 prism

prism

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 10 December 2016 - 06:32 PM

I'll try digging around in mob.c and homunculus.c some more to see if I can find anything interesting related to what you said. Thanks!


Edited by prism, 10 December 2016 - 07:13 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 23 user(s)