Jump to content

Creating an Npc That Heals Ally Npc's Need Help


mil3nko666

Recommended Posts

Okay so, I'm trying to create a npc that will heal his npc allies when in combat.

Below are 2 methods i have been working on to achieve this the first is working but not the greatest, the second isn't working because the target being healed is an asshole

 

Method 1 Works ish

this is a package i made for my healer, what it does is just select a specific target, cast heal other, select next specific target, Cast heal other, repeat. i can add more targets as well. and it does work but, is there a way to make it so my healer cycles through the specific targets as it cycles through each Target check to see if it is What certain percent of health and if it is equal or less than that percent then heal the target if it is more then go on to the next target and repeat?

Another question i have is instead of using specific targets can i choose a faction so that if anyone from the faction is nearby he will heal them as well?

 

Note: that the ones in the second pic down that are highlighted in yellow, purple and red is what u cant see in the package

Purple:Public Package Data

Red:Selected Procedure

Yellow:Procedure Tree When clicked on random (so you can see repeat is checked)

http://i48.photobucket.com/albums/f244/mil3nko666/th_5.jpg

http://i48.photobucket.com/albums/f244/mil3nko666/th_3-2.jpg

 

Method 2

 

This method i Made two characters, one is the healer npc the other is a melee npc, the pic below shows two Factions, the top one is the one i put in the Healer's faction tab, bottom is in the Melee's faction tab, as you see the Bottom faction is ally with the top but the top is enemy with the Bottom, also healer is ally with the player, you will understand why i did this when we get to the spell Effect.

 

http://i48.photobucket.com/albums/f244/mil3nko666/th_1-3.jpg

 

This is a pic of the spell i made which is pretty much a copy of Grand Healing with an added Calm Effect (which didn't calm the melee npc), The lower window in this pic is from opening the "Grand Healing : Health" in the effect section.

http://i48.photobucket.com/albums/f244/mil3nko666/th_2-2.jpg

 

This is the pic of the Magic Effect for the Healing spell, this spell is set as a hostile because the melee npc is the healer npc's enemy, so since its a hostile spell and since healer has melee as his enemy but melee having healer as ally the healer should cast his hostile healing spell, and since i have the "No Hit Event" box checked which Means "The effect is stealthy; the target does not register a hit event when struck" and its a healing spell so damage is done to the melee npc, so he shouldn't aggro from it. i assumed that it would work like this but it didn't what happened was when i sneak up on them they start combat with each other. I made a piece of armor with a invisibility constant effect but they still fought each other. so i thought maybe adding a script to the magic effect that did StopCombatAlarm after the spell was cast it would stop combat, but i don't know how to write script so i had someone to write it for me. it is in the bottom right corner in the pic below, anyway when i tested it what happent was they start fighting, when when healer cast the heal on melee, melee stops for a second then they go at it again then repeat. i had been noticing melee usually attacks first but i didnt get a very good look because i didnt take the invisibility gear off healer until recently, i took away the healers spells to see if it was melee always attacking first and indead she was. so that leaves me to the conclusion that it must be the either the way the factions are setup or just because the Healer is in combat with the melee the melee is therefor in combat with the healer.

 

I am gonna note here that melee's aggression is set to aggressive and healer is very aggressive

 

So my questions are,

Is there a way to make melee act as if the healer is not there(ignore the healer all together)?

Is there a way to make healer fly/hover out of melee range and cast spells?

Anything you can think of would be much appreciated.

http://i48.photobucket.com/albums/f244/mil3nko666/th_4-1.jpg

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...