There are a few threads about dumb fire missiles but this is to address a particular problem I'm having with them or possibly the extended triggers I use to extend their purpose. Short story: I have a system where when a player right-clicks they fire a no-target missile in a direction which will keep going until it strikes an enemy unit (using a detector persistent behavior) but when they strike a wall they bounce off of it at a realistic angle and continue on their merry way. The problem is they're some what inconsistent on what happens when they meet a wall. I'm using a high frequency trigger event that checks for any that are within .5 of any terrain above 10 (base line), I'm using 12 height cliffs as the walls. If the trigger's condition is met it then finds the closest of a particular kind of neutral unit I have scattered all over the walls aimed at appropriate directions and doing some math based on its facing vs the missile's facing it comes up with a new angle. Now a hack starts here: You can't as far as I can figure out actually change the heading of such a missile once its in flight but you can for a split second change its facing using a trigger. So I change its facing and then have it create another persistent effect identical to what created it originally...and then pull the current one out of existence. For all intensive purposes it looks like it bounced.
Now my problem is even though I have the missile's mover ignore terrain, use a -1 for cliff detection and all that it won't consistently stay at height 1, even with with that collision trigger constantly correcting their height. They still can end up far above or below the ideal height. For the most part they do of course, but a 90% success rate is certainly not ideal for what is supposed to be a player's main tool in a map. Any ideas on how to ensure these things never ever deviate on that flight axis? I wish there was a 'set to absolute height', I'd just use the same high frequency trigger to pin them on 11 and be done with it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
There are a few threads about dumb fire missiles but this is to address a particular problem I'm having with them or possibly the extended triggers I use to extend their purpose. Short story: I have a system where when a player right-clicks they fire a no-target missile in a direction which will keep going until it strikes an enemy unit (using a detector persistent behavior) but when they strike a wall they bounce off of it at a realistic angle and continue on their merry way. The problem is they're some what inconsistent on what happens when they meet a wall. I'm using a high frequency trigger event that checks for any that are within .5 of any terrain above 10 (base line), I'm using 12 height cliffs as the walls. If the trigger's condition is met it then finds the closest of a particular kind of neutral unit I have scattered all over the walls aimed at appropriate directions and doing some math based on its facing vs the missile's facing it comes up with a new angle. Now a hack starts here: You can't as far as I can figure out actually change the heading of such a missile once its in flight but you can for a split second change its facing using a trigger. So I change its facing and then have it create another persistent effect identical to what created it originally...and then pull the current one out of existence. For all intensive purposes it looks like it bounced.
Now my problem is even though I have the missile's mover ignore terrain, use a -1 for cliff detection and all that it won't consistently stay at height 1, even with with that collision trigger constantly correcting their height. They still can end up far above or below the ideal height. For the most part they do of course, but a 90% success rate is certainly not ideal for what is supposed to be a player's main tool in a map. Any ideas on how to ensure these things never ever deviate on that flight axis? I wish there was a 'set to absolute height', I'd just use the same high frequency trigger to pin them on 11 and be done with it.