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

[Trigger] need help for gravity lapse spell

Status
Not open for further replies.
Hello, I made a spell that lifts the target up in the air and brings it back down after short time. I have some problems with it, 1. after the spell is done the target appears to became flying unit, because when i try the spell again on it it says it can only target ground units. 2. in the spell it is allowed only to target enemy, organic, ground units,not self, but I can target my allies. what should I change to fix this? 3. after the spell is done something goes wrong with the targeting, when I mouse-enter on the cast unit it does not show hp bar,however I can click it.
  • Gravity Lapse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Gravity Lapse
    • Actions
      • Unit Group - Add (Target unit of ability being cast) to Gravity_Lapse_Group
      • Unit - Add Crow Form to (Target unit of ability being cast)
      • Animation - Change (Target unit of ability being cast) flying height to 400.00 at 600.00
      • Custom script: call UnitAddAbility(GetSpellTargetUnit(), 'Aloc')
      • Unit - Set (Target unit of ability being cast) acquisition range to 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Gravity Lapse for (Casting unit)) Equal to 1
        • Then - Actions
          • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in 4.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Gravity Lapse for (Casting unit)) Equal to 2
        • Then - Actions
          • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in 5.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Gravity Lapse for (Casting unit)) Equal to 3
        • Then - Actions
          • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in 6.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Gravity Lapse for (Casting unit)) Equal to 4
        • Then - Actions
          • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in 7.00 seconds
        • Else - Actions
  • Timer GL
    • Events
      • Time - Gravity_Lapse_Timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Gravity_Lapse_Group and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 600.00
          • Unit - Hide (Picked unit)
          • Unit - Remove Crow Form from (Picked unit)
          • Custom script: call UnitRemoveAbility(GetEnumUnit(), 'Aloc' )
          • Unit - Unhide (Picked unit)
          • Selection - Select (Picked unit) for (Owner of (Picked unit))
          • Unit - Set (Picked unit) acquisition range to (Default acquisition range of (Picked unit))
          • Unit Group - Remove (Picked unit) from Gravity_Lapse_Group
 
Level 5
Joined
Jan 27, 2014
Messages
164
1. Just make the spell be able to target both flying and ground unit?

2. Enemy, organic, air, ground.

3. Because you added/removed Locust. This will bug the HP/Mana bar. The unit will also be harder to select.
 
You can not remove Aloc that easy with this line. Think I have seen once a trick with meta to remove it but anyway it's more work as just to make it invul during it's flight.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Level of Gravity Lapse for (Casting unit)) Equal to 1
  • Then - Actions
  • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in 4.00 seconds
  • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Level of Gravity Lapse for (Casting unit)) Equal to 2
  • Then - Actions
  • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in 5.00 seconds
  • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Level of Gravity Lapse for (Casting unit)) Equal to 3
  • Then - Actions
  • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in 6.00 seconds
  • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Level of Gravity Lapse for (Casting unit)) Equal to 4
  • Then - Actions
  • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in 7.00 seconds
  • Else - Actions
-->
  • Countdown Timer - Start Gravity_Lapse_Timer as a One-shot timer that will expire in (3.00 + Level of Gravity Lapse) seconds.

This spell won't work correctly with more than instance.
You use one timer and one global unit group. If someone casts again, the timer starts from new.(and now with a new timeout, depending on the ability-level)
So now when the timer expires the first and the second unit get removed both the same time.

You could use artificial waits: http://www.hiveworkshop.com/forums/...279/mui-spells-using-artificial-waits-223315/

Edit:
or an easier but bit worse methode: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/mui-triggers-waits-218354/ <-- don't use it here.
 
Last edited:
Level 5
Joined
Jan 27, 2014
Messages
164
Then, just remove the air.
You don't need 'Not self'. Using 'enemy' would suffice.

Edit:
Completely forgot about the targeting fly unit issue...
I'm not too sure what is the best solution for you.

As far as I know, adding/removing Storm Crow Form or Crow Form does not make a unit a fly unit.
Not sure what you did there though.
 
Last edited:

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
As far as I know, adding/removing Storm Crow Form or Crow Form does not make a unit a fly unit.
it does make the unit can fly, but not adding fly classification to that unit..

you kknow warcraft debug message sometimes shows a wrong message? so my suggestion is just check your OE data, make sure there is nothing wrong there.. because AFAIk, you can't add/remove unit classification via trigger.. that's all and good luck..
 
Status
Not open for further replies.
Top