| 05-09-2008, 03:05 PM | #1 |
i want that when a unit is moving/attacking it will be considred air and it will be at height 250 from the ground but when its not moving/attacking it will be considered ground and will be at height 0 from the ground anyone has an idea of how to do this? |
| 05-10-2008, 03:23 AM | #2 |
Uhhh... the only way I can think of it would be to use a very fast periodic timer to see what it is doing at that particular moment and then, well actually then I don't know what I'd do because I don't think you can change a unit's "targeted as" at run-time. Maybe then you could constantly Chaos-morph the unit between the two desired forms, or you could try using the Druid's morphing abilities instead. |
| 05-10-2008, 09:15 AM | #3 |
u think the periodic timer could work with multipule units that some of them are the same type? |
| 05-11-2008, 06:09 AM | #4 |
Yes. Be more specific and I might be able to help you. |
| 05-11-2008, 07:02 AM | #5 |
Chaos is more convenient, imo. Whenever ordered, add it and whenever not, remove it. |
| 05-11-2008, 12:05 PM | #6 |
Trigger: ![]() Events- Unit - is issued an order targeting a point
![]() Events- Unit - is issued an order targeting an object
![]() Conditions - (Unit-type of (triggering unit)) equal to unit{ground}
![]() Actions Unit - Replace (triggering unit) with a unit{air} using The old unit's relative life and manathis worked for the first part (when the unit moves/attacks) Trigger: ![]() Events - Unit is issued an order with no target
![]() Conditions - (unit type of (triggering unit) equal to unit{air}
![]() Actions Unit - Replace (triggering unit) eith a unit{ground} usint The old unit's relative life and manathis trigger worked only when i told the unit to stop instead of working automaticly when the unit doesn't attack/move |
| 05-11-2008, 05:55 PM | #8 |
You should convert a gui trigger that working for 1 unit to jass with local variable. Not very difficult and better ^^ |
| 05-11-2008, 06:06 PM | #9 |
Don't know how to use JASS but with the problems I've been running into i should probably learn |
| 05-11-2008, 08:27 PM | #10 |
If it's just about using local variables, i think that is pretty easy. I'm just using jass for multi-instanceable spells and this fast and easy. |
| 05-11-2008, 10:17 PM | #11 |
i think figured it out Trigger: ![]() Events - Time - Every 1.00 second of game time
![]() Actions - Unit Group - Pick every unit in (unit of type unit{air}) and do actions
![]() Loop - Actions
![]() If (All Conditions are True) then do (then Actions) else do (else Actions)
![]() If - Conditions
![]() (current order of (Picked Unit)) Not equal to (order(move)) and (current order of (Picked Unit)) Not equal to (order(attack))
![]() Then - (the height and classification change)
![]() Else - Do nothingit works but when i tell the unit to move with the right mouse click instead of the Move order it still activates the trigger |
| 05-12-2008, 01:10 AM | #12 |
If i am correct the "smart" order is a "right-click" EDIT: i tested your trigger out with the "smart" command added and it worked so now both you and me have our "unit is not moving" trigger |
| 05-17-2008, 03:25 PM | #13 |
what does the actions "add/remove classification" do because i tried using them to change the "targeted as" but it didn't work and constant morphing isn't practical (too many triggers,and causes bugs in the triggers) is there a way to change the "targeted as" during the game? p.s i replying here because it hasn't been a week since last post and i do it here and not in trigger forum because this thread already exists so why create a new one |
| 05-17-2008, 04:29 PM | #14 |
You can't change "Targeted As" without morphing. |
