Re: Turret and GT not shooting [message #469267 is a reply to message #469244] |
Thu, 14 June 2012 01:06 |
|
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma:
|
General (5 Stars) |
|
|
I have found the best way to handle 'stop shooting at stuff you can no longer see' is to record the last time you 'saw' the enemy (via the Enemy_Seen) event and have a timer that fires regularly to check that against the current time. If you have not 'seen' the enemy you are trying to shoot at for more than 2 or 3 seconds you should probably stop shooting at them.
Alternatively if you change;
params.AttackCheckBlocked = false;
to
params.AttackCheckBlocked = true;
I believe you will get an ActionComplete and it will stop firing if it can no longer shoot at the target, but I am not 100% sure what AttackCheckBlocked does so you will have to experiment (this is the sort of thing I would like to document so let me know your results if you do try this)
reborn wrote on Wed, 13 June 2012 22:57 |
Very nice documentation, DP. As a community, we tend to lack proper documentation, good job!
|
I am actually working on documenting all of the TT stuff in that fashion but there's an awful lot of it so it's slow going. Jonwil has done a bit too.
Another example;
[Updated on: Thu, 14 June 2012 01:14] Report message to a moderator
|
|
|