• 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] Morph Trigger Spell Problem

Status
Not open for further replies.
Level 7
Joined
Oct 8, 2008
Messages
200
It sets all the items,exp and creates the unit etc the only problem is I don't learn the spells my unit suppose to learn

  • Actions
    • Set Unit_Morph_Unit = (Triggering unit)
    • Set Unit_Morph_Ability_Level_1 = (Level of Spell 1 for Unit_Morph_Unit)
    • Set Unit_Morph_Ability_Level_2 = (Level of Spell 2 for Unit_Morph_Unit)
    • Set Unit_Morph_Ability_Level_3 = (Level of Spell 3 for Unit_Morph_Unit)
    • Set Unit_Morph_Ability_Level_4 = (Level of Spell 4 for Unit_Morph_Unit)
    • Set Unit_Morph_Ability_Level_5 = (Level of Spell 5 for Unit_Morph_Unit)
    • Set Unit_Morph_Exp = (Hero experience of Unit_Morph_Unit)
    • Set Unit_Morph_Point = (Position of Unit_Morph_Unit)
    • Set Unit_Morph_Skill = (Unspent skill points of Unit_Morph_Unit)
    • Set Unit_Item_1 = (Item carried by Unit_Morph_Unit in slot 1)
    • Set Unit_Item_2 = (Item carried by Unit_Morph_Unit in slot 2)
    • Set Unit_Item_3 = (Item carried by Unit_Morph_Unit in slot 3)
    • Set Unit_Item_4 = (Item carried by Unit_Morph_Unit in slot 4)
    • Set Unit_Item_5 = (Item carried by Unit_Morph_Unit in slot 5)
    • Set Unit_Item_6 = (Item carried by Unit_Morph_Unit in slot 6)
    • Wait 1.50 seconds
    • Unit - Remove Unit_Morph_Unit from the game
    • Unit - Create 1 Unit for (Owner of (Triggering unit)) at Unit_Morph_Point facing Default building facing degrees
    • Hero - Set (Last created unit) experience to Unit_Morph_Exp, Hide level-up graphics
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Unit_Morph_Ability_Level_1 Not equal to 0
      • Then - Actions
        • Hero - Learn skill for (Last created unit): Spell 1
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Unit_Morph_Ability_Level_2 Not equal to 0
      • Then - Actions
        • Hero - Learn skill for (Last created unit): Spell 2
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Unit_Morph_Ability_Level_3 Not equal to 0
      • Then - Actions
        • Hero - Learn skill for (Last created unit): Spell 3
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Unit_Morph_Ability_Level_4 Not equal to 0
      • Then - Actions
        • Hero - Learn skill for (Last created unit): Spell 4
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Unit_Morph_Ability_Level_5 Not equal to 0
      • Then - Actions
        • Hero - Learn skill for (Last created unit): Spell 5
      • Else - Actions
    • Unit - Set level of Spell 1 for (Last created unit) to Unit_Morph_Ability_Level_1
    • Unit - Set level of Spell 2 for (Last created unit) to Unit_Morph_Ability_Level_2
    • Unit - Set level of Spell 3 for (Last created unit) to Unit_Morph_Ability_Level_3
    • Unit - Set level of Spell 4 for (Last created unit) to Unit_Morph_Ability_Level_4
    • Unit - Set level of Spell 5 for (Last created unit) to Unit_Morph_Ability_Level_5
    • Hero - Give Unit_Item_1 to (Last created unit)
    • Hero - Give Unit_Item_2 to (Last created unit)
    • Hero - Give Unit_Item_3 to (Last created unit)
    • Hero - Give Unit_Item_4 to (Last created unit)
    • Hero - Give Unit_Item_5 to (Last created unit)
    • Hero - Give Unit_Item_6 to (Last created unit)
    • Hero - Modify unspent skill points of (Last created unit): Set to Unit_Morph_Skill points
    • Selection - Select (Last created unit) for (Owner of (Triggering unit))
    • Custom script: call RemoveLocation (udg_Unit_Morph_Point)
 

Vex

Vex

Level 3
Joined
Dec 1, 2007
Messages
33
Have you tried adding the abilities to the replacement unit in the Object Editor?

Or try using the 'Unit - Add Ability' function instead of 'Hero - Learn Skill'.

Not sure if any of those suggestions work, but should be worth a try.
 
Status
Not open for further replies.
Top