Can you count the letter d in:
Discussion in JASS Resources started by Spellbound, Jun 26, 2018.
This library comes in 2 versions: one that uses ListT and one that uses TimerUtils. Youll probably want the ListT version if youre going to be adding airborne effect to a lot of units.
as to avoid the hashtable limit.
Autofly library and make your life easier. One is available in the test map. Requires UnitDex.
RiseAndFall[yourUnit] will return the RiseAndFall instance of a unit.
^ This will cause a unit to changed its height from currentZ to endZ over duration.
can be useful for units that fly or hover.
This function returns the struct instance if you wish to store it.
^ This will make your unit appear to levitate between currentZ and endZ over duration.
Set a narrow distance for a more realistic effect.
^ This returns true if a unit is airborne/falling/rising.
Set to the current height of the unit to terminate immediately.
- v1.05 creator methods renamed to create/createAirborne. Added safety to the private .createEx method as well as to the .end method. Updated documentation. Removed unused/redundant lines.
- v1.04 fixed an issue with the initialization order which was causing libraries depending on RiseAndFall to freeze when saving. Also added a speed parameter to .end for greater control.
- v1.03 RiseAndFall.end now requires a real rather than a boolean.
- v1.02 RiseAndFall.start now takes a boolean argument rather than a integer. RiseAndFall.end now takes a real argument for the endZ.
- v1.01 updated code in great part thanks to Wareditor.
Welp, Im told there are many inefficient things about this library, so I guess hold off until this is updated.
So, Wareditor fixed it. Is good now.
The test map seems to work fine.
Why use moveType over a boolean? If a user wants only flying units to have smooth movement this can be done manually.
Right now I feel it is just weird to use integer instead of boolean, where 8 and 2 is true.
looks like an interpolation. Can you tell me which interpolation method you used?
If something in your code is supposed to be configurable, you should use constants for that or put it at the top, so people can see it when reading the documentation.
You could also say something in the docuemantation about it: if you want units to be reset to fly height 0, you can change that in function ...
Addiotionally if wanted does not specify what would change.
RiseAndFall was initially meant to be use with another library of mine where movetype was necessary, but I guess I can just detect movement type in that library itself and pass a boolean depending on the type. I changed the argument to boolean.
Im told the jurys still out on the naming convention of static members?
That comment was supposed to have been removed, but I forgot. You pointing it out made me realised I should have added another argument to .end, so I did that for v1.02.
EDIT: Actually, I might just remove the boolean flag in .end and just keep the real parameter. If the current height matches the endZ, it destroys immediately.
Updated to v1.03. .end now takes a real instead of a boolean.
), but its useful so approved.
In the ListT version, you should make the init struct extend an array, or better to remove it and implement the Init module directly in the RiseAndFall struct since the method setup() should also be private.
Ah, thanks for noticing. Will remove.
Hmm, actually thats something I need clarification on. Is there any initialization order difference between implementing a module in a private vs a non-private struct? I was always under the impression that things could bug if the struct wasnt private?
Ill use the operator to check for the instance and override it if one is already in effect on the unit.
There will no difference. What causes a bug is if the onInit method is not private inside a module, which will be recognized as a struct onInit, hence will be given lower priority in initialization.
But it would be better if you will allocate an instance only if the unit isnt affected yet. If it already is, just use the existing instance.
user
There are one hundred and thirty-three "d"s in the text you provided.
assistant