Demons Healing Demons

Get help using Construct 2

Post » Mon Jul 03, 2017 11:43 am

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
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Mon Jul 03, 2017 7:41 pm

anyone?
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Tue Jul 04, 2017 5:36 am

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.
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Tue Jul 04, 2017 12:57 pm

@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
Last edited by darkrealos on Tue Jul 04, 2017 1:49 pm, edited 1 time in total.
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Tue Jul 04, 2017 1:14 pm

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.
B
47
S
18
G
84
Posts: 2,261
Reputation: 49,776

Post » Tue Jul 04, 2017 1:34 pm

@plinkie 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 :)
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Tue Jul 04, 2017 1:51 pm

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.
B
47
S
18
G
84
Posts: 2,261
Reputation: 49,776

Post » Tue Jul 04, 2017 2:28 pm

@plinkie 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 :)
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Tue Jul 04, 2017 5:08 pm

@plinkie 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
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Tue Jul 04, 2017 5:36 pm

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.
B
47
S
18
G
84
Posts: 2,261
Reputation: 49,776

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 10 guests