• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] please help... flying height problem ><

Status
Not open for further replies.
Level 2
Joined
Feb 6, 2007
Messages
8
this is very strange.. though this is my first spell with flying height ive looked over lots of ones taht work and i cant see why mine doesnt.. ive wayy oversimplified it to try to find the root of the problem but here is the code

i want it to move all of the units around the caster up then down
  • Slam
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slam
    • Actions
      • Set trigspotslam = (Position of (Triggering unit))
      • Set slamgroup = (Units within 1000.00 of trigspotslam matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
      • Unit Group - Pick every unit in slamgroup and do (Actions)
        • Loop - Actions
          • Unit - Add Crow Form to (Picked unit)
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit) flying height to 600.00 at 600.00
          • Wait 0.50 seconds
          • Animation - Change (Picked unit) flying height to 0.00 at 600.00

thank you in advance
 
Last edited by a moderator:
Level 3
Joined
May 28, 2005
Messages
47
  • Slam
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Slam
  • Actions
  • Set trigspotslam = (Position of ([b]CASTING[/b] unit))
  • (((Change this part)))
  • Unit Group - Pick every unit within 1000 of trigspotslam matching condition (Matching unit) is an enemy of owner of (Casting unit) equal to true
  • Loop - Actions
  • Add uni to slamgroup
  • Unit Group - Pick every unit in slamgroup and do (Actions)
  • Loop - Actions
  • Unit - Add Crow Form to (Picked unit)
  • Unit - Pause (Picked unit)
  • Animation - Change (Picked unit) flying height to [b]600.00 at 600.00[/b]
  • (((I think that the 600 at 600 needs to be changed, but I forget I think it's 600 at 10 because you divide the two BUT IM NOT SURE)))
  • Wait 0.50 seconds
  • Animation - Change (Picked unit) flying height to 0.00 at 600.00
 
Last edited by a moderator:
Level 11
Joined
Jul 12, 2005
Messages
764
You cannot use a wait inside a 'Pick units...' action!
  • Unit Group - Pick every unit in slamgroup and do (Actions)
  • Loop - Actions
  • -Unit - Add Crow Form to (Picked unit)
  • -Unit - Remove Crow Form from (Picked unit)
  • -Animation - Change (Picked unit) flying height to 600.00 at 600.00
  • Wait 0.50 seconds
  • Unit Group - Pick every unit in slamgroup and do (Actions)
  • Loop - Actions
  • -Animation - Change (Picked unit) flying height to (Default fly height of Picked Unit) at 600.00
1. You cannot be sure that every unit has a 0 fly height initially, so in the end land them at normal fly height.
2. You don't have to pause the units.
3. After adding Crow Form, instantly remove it. The fly height will stay changable, but the ability's icon will not appear on the control panel of the unit.
4. Do not use casting unit!! This is a great mistake. Triggering unit is always above Casting unit. Everyone who knows jass, knows this fact.
 
Last edited by a moderator:
Status
Not open for further replies.
Top