Hi BPower,
thank you a lot for creating this resource! I am interested in using this as it simplifies a lot without any down sides to me. I am glad, you added this excellent documentation so I can actually try to understand it. Thank you for that user-friendliness!
However I got some questions about this system which I think, you are able to answer pretty easily anyway..
Question 1----------------------------------------------------------------------------------------------
what is the purpose of the bounce method, if there is the deflect method? Is there some situation, where I would need to use that instead of deflect? (sry if this is a stupid question)
I think I do not understand it because I did not really get these 2 following methods. Sry, can you shortly explain this to me. So why do I have to use these methods and what are they doing? I am kind of confused about this after reading through the whole missile code.
JASS:
call missile.origin.move(missile.x, missile.y, missile.z)
call missile.impact.move(missile.x + Cos(missile.angle)*ARROW_FLY_RUN_OUT_DISTANCE, missile.y + Sin(missile.angle)*ARROW_FLY_RUN_OUT_DISTANCE, missile.z)
Do these 2 functions simply reset the start and end point of the missile? It seems so, judged from the demo code, you provided (simple spell collection, guided arrow). but why dont you deflect it there?
Question 2----------------------------------------------------------------------------------------------
I think, there is a typo in the comments about the "onItemFilter"? you wrote 2x "onDestructableFilter", but I think, the second filter should read "onItemFilter". I was not able to spot this in the code, but I hope, the typo occures only in the description? Is this even a mistake, or did I read it wrong?
// By the way, I think there are some more typos in the explanation, e.g. toogles instead of toggles
Question 3----------------------------------------------------------------------------------------------
So, by reading the code and your explanation, it is pretty clear, we do not want unit indexers to recognize missiles, and you kindly provided
JASS:
/**
* Unit indexers and missiles ( Only if you don't use a dummy recycling library )
* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
* It is most likely intended that projectiles don't run through a unit indexing process.
* ToogleUnitIndexer runs:
* • Directly before a dummy is created.
* • Directly after dummy unit creation.
*
* Please return the previous setup of your indexing tool ( enabled, disabled ),
* so Missile can properly reset it to the original state.
*/
private function ToogleUnitIndexer takes boolean enable returns boolean
local boolean prev = true//UnitIndexer.enabled
// set UnitIndexer.enabled = enable
return prev
endfunction
But I do not really understand, how I would link that hypothetical unit indexer to missile. I actually do not use any unit indexer, so I wondered, whether the enabled/disabled state of the indexer can be dynamic, or would I simply add true or false like in the presets?
Sry, I am confused right there, could you simply put an example? Would it be
JASS:
private function ToogleUnitIndexer takes boolean enable returns boolean
local boolean prev = UnitIndexer.enabled
set UnitIndexer.enabled = enable
return prev
endfunction
Question 4----------------------------------------------------------------------------------------------
Phew, so this is the last question, thanks for reading all that.
It is short: When I copy over MissileRecycler by Bribe, do I have to follow the instructions for implementing it, or does missile do that for me? I guess, I have to follow the instructions, right? And, I assume, that the 'dumi' unit is the same correct one, that is needed for both systems, is that correct?
Thanks for any answers and best regards