Demons Healing Demons

0 favourites
From the Asset Store
Characters of humans defending themselves against demons You can create an attractive game character by using this pack
  • hi there i was wondering if someone can help me, im trying to have my demon healers try find demons that have lower health then their max health and then pathfind to them and heal but the demons dont stop to heal demons or chuck the healing potions at them, i think the problem is the code demons HP < demons.HPMax but i'm not sure how to work around this. image in link below of code

    http://imgur.com/a/B8Bu3

  • anyone?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello o/

    What is the initial values of the RangedAttackX and Y ?

    I see you change those values when any demon is damages, still the timer might still be triggering depending on those values.

  • RayKi hi there thanks alot for replying, the initial value is -500000 on both so that when the demons spawn and start initially moving they wont see that point so then they sound pathfinding as normal til they find a target they want, the problem is it wont trigger to find a demon as i think the trigger will only trigger itself meaning i think if a demon healer has less then -hpmax then the demon healer will trigger the effect

    p.s im trying to keep this project secret so if you want to see anything let me know and ill just print screen code you want to see

  • The picking you're concerned about at the top seems fine unless DemonHealer is also in the Demons family, then it could be really broken. I don't know if in the game Healers look to heal other Healers or there are just generic Demons that are healed.

  • yeah the demon healers are in Demons aswell, but i can live without healers healing healers, as thier main goal is to heal front line troops, so what if i did and or block?

    for the other demons excluding demon healers, do you think that would work? thanks for the reply really appreciate it

  • Yeah they will likely be picking themselves and not moving then. Some other part of the logic could be broken but hard to tell. Just take the demon healers out of the Demons family and see if it works. They should only move to other demons then. If you need more help you might have to eventually share something, make a simple version that someone can look at.

  • thanks for the reply i will try this new method and see what happens yeah making a simple version will be hard as there is so much code XDDD but thanks a bunch for the help and i will update on the progress

  • hey sir here's updated code and simplified so everything you see should work by it self, but it doesn't, the demons don't seem to be healing people or moving towards them even tho, looking in the debugger they dont even trigger the event so even tho demons hp is below maxhp they still dont trigger

    http://imgur.com/a/NwtaG

  • That logic is still going to pick a healer, you've not moved it out of the family right? You've split up the individual demons but when you go to pick nearest you're picking the family again. You're picking the nearest demon to the healer which is the healer itself. Your logic was fine before, you should just remove the healer from the family.

  • ahh i see that makes sense the only problem i have is that if i remove the demonhealer from the demons family then it will lose all of its variables and pathfinding and stuff as ive combined it all through the family, would it be possible to make a family called nonhealers just for the objects and use that?

  • Yes put everything that is not to be healed in its own family then.

  • ahhh brilliant ill give that a try and let you know

  • no luck the event still wont trigger, i think for some reason it wont read the hp trigger , as ive done tests to check what triggering and it wont change variable after the hp one

  • anyone help with this problem?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)