• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Pulling my hair out plz help

Status
Not open for further replies.
Level 3
Joined
Mar 20, 2011
Messages
35
(Solved) Pulling my hair out plz help

In order for my spell to work the user must already have the ability based of metamorphis however I dont want the icon too appear this spell has to be MUI so no actiavate/deactivate spell for player.

long story short how can I completley hide the ability or is there any other way around my dilema.

The spell is for a Bearwolf. it basically leaps towards the target and transforms midair(which is where im using metamorphis)

heres my triggers

  • Transformation Leap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transformation Leap
    • Actions
      • Unit - Pause (Target unit of ability being cast)
      • Unit Group - Add (Casting unit) to Transformation_Leap_Ugroup
      • Unit - Add Crow Form to (Casting unit)
      • Unit - Remove Crow Form from (Casting unit)
      • Unit - Pause (Target unit of ability being cast)
      • Unit - Turn collision for (Casting unit) Off
      • Animation - Change (Casting unit) flying height to 500.00 at 2000.00
      • Hashtable - Save Handle Of(Target unit of ability being cast) as 1 of (Key (Casting unit)) in Transformation_Hashtable
      • Hashtable - Save 1000.00 as 2 of (Key (Casting unit)) in Transformation_Hashtable
      • Hashtable - Save (Angle from (Position of (Casting unit)) to (Position of (Target unit of ability being cast))) as 3 of (Key (Casting unit)) in Transformation_Hashtable
      • Hashtable - Save True as 4 of (Key (Casting unit)) in Transformation_Hashtable
  • Transformation Moving
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Transformation_Leap_Ugroup and do (Actions)
        • Loop - Actions
          • Set Transformation_Leap_Loc = ((Position of (Picked unit)) offset by 20.00 towards (Load 3 of (Key (Picked unit)) from Transformation_Hashtable) degrees)
          • Unit - Move (Picked unit) instantly to Transformation_Leap_Loc
          • Hashtable - Save ((Load 2 of (Key (Picked unit)) from Transformation_Hashtable) - 20.00) as 2 of (Key (Picked unit)) in Transformation_Hashtable
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 2 of (Key (Picked unit)) from Transformation_Hashtable) Less than or equal to 650.00
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 4 of (Key (Picked unit)) from Transformation_Hashtable) Equal to True
                • Then - Actions
                  • Hashtable - Save False as 4 of (Key (Picked unit)) in Transformation_Hashtable
                  • Unit - Add BearForm to (Picked unit)
                  • Unit - Remove BearForm from (Picked unit)
                  • Set Transformation_Damage_Loc = (Position of (Picked unit))
                  • Unit - Create 1 Footman for (Owner of (Picked unit)) at Transformation_Damage_Loc facing Default building facing degrees
                  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                  • Unit - Add Damage bonus Bearwolf to (Last created unit)
                  • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
                  • Custom script: call RemoveLocation(udg_Transformation_Damage_Loc)
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 2 of (Key (Picked unit)) from Transformation_Hashtable) Less than or equal to 350.00
            • Then - Actions
              • Unit - Add Crow Form to (Picked unit)
              • Unit - Remove Crow Form from (Picked unit)
              • Animation - Change (Picked unit) flying height to 0.00 at 2000.00
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 2 of (Key (Picked unit)) from Transformation_Hashtable) Equal to 0.00
            • Then - Actions
              • Unit - Cause (Picked unit) to damage (Load 1 of (Key (Picked unit)) in (Last created hashtable)), dealing (100.00 + (50.00 x (Real((Level of Transformation Leap for (Picked unit)))))) damage of attack type Spells and damage type Shadow Strike
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (100.00 + (50.00 x (Real((Level of Transformation Leap for (Picked unit)))))))
              • Unit Group - Remove (Picked unit) from Transformation_Leap_Ugroup
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Transformation_Leap_Loc)
and if you need to see the map here it is.
View attachment Bearwolf.w3x
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
You can not hide Metamorphosis icon. You could describe what the spell is supposed to do. There is an alternate way of changing unit type, use bear form, set the default unit type to the new unit type and the old type to the alternate type. Adding and instantly removing the ability will transform the unit.
 
Level 3
Joined
Mar 20, 2011
Messages
35
Thx will try it now

EDIT: oh you think I need to change the unit type no its actually more of an asthetic thing rather than needing to change something like flying height, as you said it would help if I gave you more detail.
 
Level 3
Joined
Mar 20, 2011
Messages
35
I did only add/remove crow form... and I usually work this messy lol I clean up when the spell is working.

That only seems to work if the unit has a diffrent model file my unit uses the same model file
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
Are you sure you've have done it properly?
Set: Normal form field - UNIT you morth TO.
Alternative form - UNIT you morth FROM.

Meaby use pause action after morth trick.
As said, your trigger leaks:
  • Set Transformation_Leap_Loc = ((Position of (Picked unit)) offset by 20.00 towards (Load 3 of (Key (Picked unit)) from Transformation_Hashtable) degrees)
  • Hashtable - Save (Angle from (Position of (Casting unit)) to (Position of (Target unit of ability being cast))) as 3 of (Key (Casting unit)) in Transformation_Hashtable
Positions of: Picked unit, Casting unit, Target of ability being cast leaks
Instead of Casting unit, use Triggering unit - it's faster.
 
Level 5
Joined
Feb 6, 2011
Messages
177
if what i understood is right then you want to hide the ability button in the buttons .. well you can base your ability on the "pheonix fire ability that is hard coded and its button just dont show in the hero abilities buttons .. however it is counted as an ability "1 of the 5 abilities that the hero can have"
maybe this is a noob answer but thats everything i know about it..sorry
 
Level 3
Joined
Mar 20, 2011
Messages
35
I know my triggers leak... it doesnt seem to work when both my units use the same model tested it with diffrent models and it worked so that doesnt work.

if what i understood is right
well the ability needs to be active not passive.

EDIT:
well it looks like im not going to be able to do this so i may use 2 diffrent models that look similar and use the before said method wont look as good but will be functional.
 
Are you sure you've have done it properly?
Set: Normal form field - UNIT you morth TO.
Alternative form - UNIT you morth FROM.

Meaby use pause action after morth trick.
As said, your trigger leaks:
  • Set Transformation_Leap_Loc = ((Position of (Picked unit)) offset by 20.00 towards (Load 3 of (Key (Picked unit)) from Transformation_Hashtable) degrees)
  • Hashtable - Save (Angle from (Position of (Casting unit)) to (Position of (Target unit of ability being cast))) as 3 of (Key (Casting unit)) in Transformation_Hashtable
Positions of: Picked unit, Casting unit, Target of ability being cast leaks
Instead of Casting unit, use Triggering unit - it's faster.

I know my triggers leak... it doesnt seem to work when both my units use the same model tested it with diffrent models and it worked so that doesnt work.


well the ability needs to be active not passive.

EDIT:
well it looks like im not going to be able to do this so i may use 2 diffrent models that look similar and use the before said method wont look as good but will be functional.

As Spinmaker has said, your spells leak before attemping to found out the problem.
Maybe look into actually fixing the leaks, cause they can cause bugs sometimes, which i have found
like the following
  • Actions
    • Set Caster = (Triggering unit)
    • Set CasterPoint = (Position of (Caster)
Obvisouly this is not MUI, due to Indexing is not used but always remember to remove your location to prevent leaks.
  • Actions
    • Custom script: call RemoveLocation(udg_CasterPoint)
Try adding them into your triggers, and see if that prevents the bug.
 
Level 3
Joined
Mar 20, 2011
Messages
35
Thanks for all the help tried all the things you said and still didnt work... I have decided to use 2 seperate models now as the Bearwolf model had some ingame problems and all works perfectly now thx again for the help.
 
Status
Not open for further replies.
Top