Hi!
While I wait for respons on my old problem, I do other stuff, and I have a problem.
I'm making a weapon that you place and it turns. When it sees someone, it should shoot. I've used the same piece of code as force pull would use... Actually no... I took this piece of code from the GOLEM mod's Assassin Droids. And I've edited it so it would take even actors that were immune to force targets. But there is a problem, or 2..
Problem 1: The HasLOS is not working. The object is targetting something on the other side of the level!
Problem 2: The object won't target droids, ATSTs, or turrets. Please help me make it so.
/Edward
If you want the whole code (weapon COG, class COG, template) Just ask!
While I wait for respons on my old problem, I do other stuff, and I have a problem.
I'm making a weapon that you place and it turns. When it sees someone, it should shoot. I've used the same piece of code as force pull would use... Actually no... I took this piece of code from the GOLEM mod's Assassin Droids. And I've edited it so it would take even actors that were immune to force targets. But there is a problem, or 2..
Code:
if(HasLOS(GetSenderRef(),potential) && (potential != GetSenderRef()) && (potential != player) && !(GetThingFlags(potential) & 0x200) && !((jkGetFlags(potential) & 0x20) && !IsInvActivated(player, 23)))
Problem 1: The HasLOS is not working. The object is targetting something on the other side of the level!
Problem 2: The object won't target droids, ATSTs, or turrets. Please help me make it so.
/Edward
If you want the whole code (weapon COG, class COG, template) Just ask!