• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

GUI AutoFly v1.0.0.1

This system is so simple, uploading it should count as trolling, but it actually is quite useful.
With this simple system, you would never need to add crow form and remove it ever again.
All ground units would be able to 'fly'.

It's also more efficient this way since you can omit 2 function calls per spell cast (for spells involving 3D movement).

  • GUI AutoFly
    • Events
      • Game - UnitIndexEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • -------- ----------------- --------
      • -------- This trigger will run whenever a unit is indexed. --------
      • -------- This means that it runs whenever a new unit enters the map. --------
      • -------- ----------------- --------
      • -------- First, I'm adding the crow form ability to the indexed unit. --------
      • -------- The reason we're using it inside an if block is because the "UnitAddAbility" function returns a boolean. --------
      • -------- This boolean represents the successfulness of the ability adding. We need this here, because if a unit --------
      • -------- already had a crow form ability, it couldn't be added. The reason we're also using UnitRemoveAbility --------
      • -------- in the same line is because JASS has a short-circuiting feature. If one of the expressions in an 'and' --------
      • -------- expression returns false, then it stops. --------
      • -------- ----------------- --------
      • -------- We do not want to call UnitRemoveAbility for a unit that failed to have the ability added. --------
      • -------- Without this form of protection, units that already had the crow form ability would have it --------
      • -------- removed completely. --------
      • -------- ----------------- --------
      • Custom script: if UnitAddAbility(udg_UDexUnits[udg_UDex], 'Amrf') and UnitRemoveAbility(udg_UDexUnits[udg_UDex], 'Amrf') then
      • Custom script: endif
This system is based on Nestharus' AutoFly (UnitIndexer version).

This system requires GUI UnitIndexer by Bribe.

  • Bribe - GUI UnitIndexer
  • Nestharus - AutoFly (vJASS UnitIndexer version)
  • Azlier - AutoFly (vJASS AIDS version)

If you're going to rate this, I demand it be no more than a "Useful - 3". Something as simple as this doesn't deserve anything higher than that.


Keywords:
fly, autofly, nestharus, bribe, unit, indexer, unit indexer, dynamic, hanky, item, recipe, naruto, spell, system.
Contents

Just another Warcraft III map (Map)

Reviews
Vengeancekael Date: 2012/Aug/29 12:55:27 Comment: [Approved] Done what Bribe suggested. Staff Contact - Rules
Well, yeah, that's true.
That's why this system is only for people making maps :p

If they've started the map a long time ago, they can shorten their triggers by removing the Add/Remove Crow form lines, and just put this into their maps. Maps are assumed to have unit indexers in them already because they're very standard and common.

If they're starting one, they'd use this if they were sane and had tons of Z-movement spells ^_^
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
You can join them on one line:

JASS:
call GetBooleanAnd(UnitAddAbility(udg_UDexUnits[udg_UDex], 'Amrf'), UnitRemoveAbility(udg_UDexUnits[udg_UDex], 'Amrf'))

Having fewer lines in GUI helps the trigger to load more quickly when viewing it, and also easier to copy & paste in case the user wants to consolidate a bunch of triggers with the same event. And with GetBooleanAnd instead of "local boolean b" the user can copy & paste it wherever without a syntax error.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
'Arav' works the same way but 'Amrf' is not an ability found on regular-units (unlike Arav which belongs to DotT).

I believe using Amrf instead of Arav is leftover from the time before we used "if UnitAddAbility", so we would remove the ability no matter if that function returned true or not. I could be wrong. Berb(anog) might know more on this.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
Doesn't GetBooleanAnd have to evaluate both expressions first while passing them to the function?

Yeah I guess not everyone uses JNGP or the optimizer so I guess this don't work :(

Though you could do:

JASS:
call GetBooleanAnd(UnitAddAbility(udg_UDexUnits[udg_UDex], 'Amrf') and UnitRemoveAbility(udg_UDexUnits[udg_UDex], 'Amrf'), true)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If you can make them "fly" (LITERALLY), this will be an awesome system.

Currently you're just changing its height so it will make the unit look like it is "flying" but it's not, it's just visual.
You still can't cross cliffs/waters/etc.

I wish you could do this, this would be awesome :)

I tried to do this, but end up creating 2 different units per unit-type, that's not efficient would it ?
Same as Maker's Melee/Range Switch system, it requires you to create 2 unit per unit-type, quite non-user-friendly if you ask me.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
I think you should add the Event line "UnitIndexEvent equal to 0.5" to make summoned units also able to change their Z, since in Bribe's Unit indexing system UnitIndexEvent = 0.5 is used to detect a unit being summoned.
The 1.00 event fires for everything. And that's only in Unit Event where I use the 0.5 event.
 
Top