Loading Flying Units

the Lumpy

►►►
Reaction score
53
Yes, but I wouldn't have to make about 30 dummy units in the Object Editor. :eek: I'm testing it now.
 

AgentPaper

From the depths, I come.
Reaction score
107
hmm thats a good idea, but it might make them walk on the ground like a normal one, but if you can do that instead of replace then go for it (and tell me so i can change it in my free trigger code map)
 

pladams9

Seth's Good-Twin
Reaction score
19
Use "Unit - A unit begins to cast an ability." Then use a condition: "((Ability Be Cast) is Equal to (Load - (Goblin Zepplin))) is True." I'm not sure about the name of the ability exactly. But that should work. Then you change the classification, order the casting unit to load, wait until it is loaded, wait until it is unloaded, and then change the classificatiojn back again. I think.
 

the Lumpy

►►►
Reaction score
53
I don't think the unit ever begins to cast the ability, because it can't target flying units. :(
EDIT: :banghead:
 

pladams9

Seth's Good-Twin
Reaction score
19
Then perhaps you can use: "Unit - A unit is issued an order." I believe that event exists. And it should work. Then you check to see that the unit's current order is equal to "Load."
 

the Lumpy

►►►
Reaction score
53
That doesn't work either. :( When I right-click on the unit, the order is "smart" and when I try to use load it says "Can't target flying units".
 

pladams9

Seth's Good-Twin
Reaction score
19
I suppose you'll have to ues AgentPaper's method with the Load Air Unit ability. Basically take his method, remove the Dummy unit, and replace the Replace actions with Add and Remove Classification actions. You'll also have to change (Last Replaced Unit) to (Target of Ability Being Cast).
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
"Load" doesn't work on anything that has Movement type: Fly.
Setting this to "Hover" will work.
Unfortunately, hovering units can't fly over stuff anymore...

So, yes, a completely triggered ability seems the way to go.
Unless someone comes up with some better idea.
 

pladams9

Seth's Good-Twin
Reaction score
19
Well actually, Acehart, we already have a trigger that works. The Lumpy is trying a different method, but the implementation is not working and so he probably has to use the implementation used in the previous solution.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> we already have a trigger that works.

I've seen it.

> The Lumpy is trying a different method

That's why.
I was just one more poster to tell him that "Load / Unload" won't do it here.
So he could start with some other way that will, if done right.
 
B

blaze5689

Guest
take the flying units ur trying to pick up and set the targeting of them to ground unit.
 

xPheRe

New Member
Reaction score
43
I've done some tests on my own to switch fly-ground classifications but the ability doesn't load them.
I created a dummy ability that can be cast upon friend units (air or ground)
Also I edited Cargo (Goblin sapper) to target on air and ground too
Then I tried something like this
Code:
Event
    A unit begins the effect of ability
Conditions
    Ability being cast equals to Load (dummy one)
Actions
    Custom script: local unit caster = GetSpellAbilityUnit()
    Custom script: local unit target = GetSpellTargetUnit()
    Custom script: local boolean isFlying = IsUnitType(target, UNIT_TYPE_FLYING)
    -------- - --------
    Custom script: if isFlying then
        Unit - Remove A flying unit classification from (target)
        Unit - Add A ground unit classification to (target)
    Custom script: endif
    -------- - --------
    Unit - Remove Load (dummy one) from (caster)
    Unit - Add Load (Goblin sapper) to (caster)
    -------- - --------
    Unit - Order (caster) to Load (target)
    -------- This waiting is merely for test purposes --------
    Wait 1.0 seconds
    -------- - --------
    Unit - Remove Load (Goblin sapper) from (caster)
    Unit - Add Load (dummy one) to (caster)
    -------- - --------
    Custom script: if isFlying then
        Unit - Remove A ground unit classification from (target)
        Unit - Add A flying unit classification to (target)
    Custom script: endif
    -------- - --------
    Custom script: set target = null
    Custom script: set caster = null
It works great with ground units, but it doesn't work with flying ones (and that is what we want)

I'll keep trying hard to find a way
 

AgentPaper

From the depths, I come.
Reaction score
107
I think the checking air and ground is hard coded into the ability, and checks the movement type of the target instead of classification, so this wont work. also i dont think (not sure) you can remove a classification that was aready on the unit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top