Closed ldal1 closed 9 years ago
Generally speaking, radar guidance only uses the entity input, whereas laser and wire only use the vector input. Wiring both inputs up has no effect on the missile, neither positive nor negative - it's simply useless. While this isn't going to cause any problems, it figured it might be useful to know.
If you're using a missile with radar guidance in the ammo definition (please verify this, as changing ammo types resets guidance and fuse packages), you need to make sure that the target is inside of the missile's view cone. This is important for any missile, as targets can only be tracked within a certain field of view of the missile.
If that doesn't help, please give us additional information about your setup, as perhaps something simple might be wrong with it (no line of sight, fast moving target, rack is being rotated, etc...).
Thank you for a quick answer, I ran a few tests. If radar uses the input entity, i thought the problem was on the e2, wich follows:
@outputs A:array Target:entity TargetPos:vector interval(100) findInSphere(entity():pos(),Range) findIncludeClass("player") findIncludeClass("npc") A = findToArray() Target = A[I,entity] TargetPos = Target:pos()
I tested with the regular target finder, and it also didnt work. The missile didnt move. For last, i used an entity marker, and marked a prop. success.
I check the others variables you mentioned. Ammo type, line of sight, distance, fast moving, rack rotation. Any other suggestion?
It seems like your E2 is not working. A quick way of testing this is to use Wiremod's debugger tool on it, and see what the Target output is. The fact that the missiles work when using an entity marker leads me to believe that this is the problem.
With this out of the way, let's look at your code. It seems as if you want to target NPCs and players, though you were probably testing this on NPCs. As far as I'm aware, to include all types of NPCs you need to use *, which would change:
findIncludeClass("npc")
to:
findIncludeClass("npc*")
This should include all entity types that start with "npc", and hopefully your missiles will now have a valid target to track.
Thank you for your patience, I did the test you suggested. The code is working, apparently... http://i.imgur.com/gG42Ugw.jpg The results with the tow, hellfire, and in the last with the sidewinder, all with the same e2. The outputs are matching in all the cases. I've tried everything, distance, angles, velocity... T_T i'm out of ideas hahaha
First of all, this addon is awsome. Good work! But I'm having issues with the radar guidance. I'm using the same e2 i use for the wire and laser missiles, which gives me a taget pos (vector) and a target (entity), both wired to the rack's inputs, and it works perfectly fine; everything finds its way to the target. For some reason (probably me doing something wrong), the radar guided missiles are not working. Can someone point me what may be causing this issue? Ty