• 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.

Change "Unit Targeted As" Field

Status
Not open for further replies.
Level 2
Joined
Jul 31, 2010
Messages
7
Hi bloody community!
I have a little hardy question for you there. My objective is to create a ground/flying building with the Ancient's Root ability. Here is how I set "Movement" in Object Editor:

* Movement - Height = 300
* Movement - Type = Fly

And it works! The building is flying well when unrooted and is ground when rooted. Now, I want to trigger the ability. I want my trigger to change the value of:

* Combat - Targeted As = Structure

To:

* Combat - Targeted As = Flying, Structure

And, naturally, when the building roots, to return back. Is there a possible way to Trigger or to Jass this?

Thanks for your reply!:grin:
 
Level 2
Joined
Jul 31, 2010
Messages
7
Hi!
Well, thanks for your reply. I tried to use the "Storm Crow Ability" from Druid of the Talon and didn't work. The ground structure won't change to the flying one. Is there any Jass script which could do the job?:grin:
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
it is partly not working native UnitAddType(whichUnit, whichType)(because some of them actually works), the
UnitAddTypeBJ is actually
JASS:
function UnitAddTypeBJ takes unittype whichType, unit whichUnit returns boolean
    return UnitAddType(whichUnit, whichType)
endfunction
There are tons of natives that doesnt even works or works partly.
for instance
SetMapFlag(MAP_CHEATS, true/false) does nothing at all
 
Level 2
Joined
Jul 31, 2010
Messages
7
Thanks for your answers!
Well, it seems impossible.
Looks like I'll have to incorporate this function in my Custom Battle System:wink:
Blizzard ===> :ogre_datass:
Thanks a lot for all replies and tries!!:grin:
 
Level 2
Joined
Jul 31, 2010
Messages
7
Sorry for double-post and bumping but... I developed some trigger to control my "flying" building. It works with my units when I test it, but against computer player, e.g. Footman, it stills attacks my building. Why?

NOTE: units in "CBS_LiftedOffBuildings" are units which are "unrooted".

  • CBS LiftOffCancelOrder
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(attack))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of issued order) is in CBS_LiftedOffBuildings) Equal to True
        • Then - Actions
        • Else - Actions
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Ordered unit) is Able to attack flying units) Equal to True
        • Then - Actions
        • Else - Actions
          • Set tempPoint = (Position of (Ordered unit))
          • Unit - Order (Ordered unit) to Right-Click (Position of (Ordered unit))
          • Custom script: call RemoveLocation(udg_tempPoint)
 
Status
Not open for further replies.
Top