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

Status
Not open for further replies.

Terror Shark

T

Terror Shark

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:
  • 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:
thank you ill check those in a sec..
its strange tho because the units go up and stay there but they dont move back down
 
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.
Back
Top