• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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 ^_^
 
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.
 
'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.
 
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.
 
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