Jump to content

What's The Difference Between Ispet() And Ischarmed()?


Guest SWGuard

Recommended Posts

Greetings,

I'm doing the final testing on my Improved PetAI and wanted to make sure I covered all the bases. In my

code I check to see if victims are pets or players with pets / charmed pets. I then check to see

if it's controlled (if pet or charmed pet).

For the purposes of PetAI, do only units that qualify as isPet() use that? I'm just curious because it seems

like a waste of CPU cycles to check ( isPet() || isCharmed() ) if Charmed pets never get a PetAI.

I tried using Mind Control but none of my "sLog.outDetail" items printed in my console so I assume those

don't get a PetAI? Or perhaps it's because Mind Control is kinda broken?

In other words, would the PetAI as far as aggressive / defensive only apply to Warlock / Hunter pets? If not

kindly list which types of pets use that AI so I can test them.

Thanks

Link to comment
Share on other sites

First of all Mind Control has a possess effect and NOT a charm effect. If a player charms another player, you would see it in "third person", like a pet. Mind control should put you in "first person" control of the target unit and as has been said before, that's not implemented. Look for spells with a charm effect and test those.

Second, I suppose the only cased where charmed units might get an AI is in the case when a Creature charms a Player. Ofcourse that's not even close to being implemented, so I don't know how it will look in the end. If PetAI will allow both players and creatures to be the owner then yes, charmed players may get a PetAI. Otherwise they will get a different AI designed just for this particular case. We might even decide not to use an AI but that would probably be too hacky. Keep in mind that it's not even possible to put an AI on a player currently, but we should support future developments.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use