Does anyone know how to determine whether an actor is attackable? Finding the nearest non-player with >0 hitpoints works when in certain locations but I'd like to make my selection process more robust.
Does anyone know how to determine whether an actor is attackable? Finding the nearest non-player with >0 hitpoints works when in certain locations but I'd like to make my selection process more robust.
Unit->getType() ?
Theres a LUA function GetDispositionTo that returns if its Hostile, Neutral or Friendly. You'd need to run it on the player unit and pass in the target unit. Theres an Enum with the Hostile/Neutral/Friendly integer status as well.
GameLib.GetPlayerUnit():GetDispositionTo(GameLib.GetTargetUnit())
Not sure how easy it is to access the actual functions in memory, but this should give you a starting point.
Code:enum class UnitDisposition { Hostile = 0, Neutral = 1, Friendly = 2, Unknown = 3 };
Maybe player + 0xB4 = target disposition, not confirmed.
(I know this doesn't answer your question directly, but it's the only offset I know that's refer to the subject, so currently calling the internal function is the way to get disposition)
Last edited by Midi12; 06-16-2014 at 05:30 AM.
I did some testing with Unit + 0xB4 (Note Unit not only LocalPlayer).
It returns Hostile when the unit is in the process of attacking you.
Neutral Otherwise. Havent found one tagged friendly yet.
Now. Im not sure if this is the units target disposition. or it to the local player. As currently Im always the target when Its hostile (Im attacking it..) im not sure how to test it (I cant run alt clients and setup a nice situation with an alt my pc can barely manage the single wildstar instance)
Note I was only checking objects where
Code:Unit->Type == UnitType.NonPlayer
AMD Athlon 64 X2 5000+ / 4.5gb Ram / GTX 460.
Wont help. my processor is just terrible. Its overclocked to buggery and still only just makes wildstar playable on v-low.
Thanks for clearing that up.