• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How to make a spell that change you between 2 forms? Like bearform but with different spells

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2018
Messages
167
I used bearform, but when i changed to the other unit, i had all the abilities from both forms. How to fix that?


P. S i am Using same unit but with different weapons and abilities, but when i use bearform i still have the abilities from the first form.
 
If your alternate unit type doesn’t share any abilities with your main unit type, that is expected behavior. Any abilities added through triggers need to have UnitMakeAbilityPermanent called on them to persist through morphing.
How to do that trigger? Can't find it, also i don't even know if its event,condition or action
 
  • Custom script: call UnitMakeAbilityPermanent(udg_MyUnit, true, 'A000')
'A000' is the raw code of a custom ability, to see ability or any object's (units, items, etc.) raw code toggle between ctrl + d on/off on object editor.
upload_2020-1-14_11-58-48.png
 
Raw code of an object isn't a variable, you need to create a unit variable in the variable dialog something like "MyUnit", which in JASS is udg_MyUnit, and you need to put that in the custom script.
upload_2020-1-14_16-52-3.png


Sorry for wasting your time, its just my first time doing custom scripts and triggers like this one.
 
It needs to be a unit, not unit-type.
Not working
  • Morphin abilities 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Snipe/Knife [W]
    • Actions
      • Custom script: call UnitMakeAbilityPermanent(udg_MyUnit, true, 'A083')
upload_2020-1-14_18-19-54.png

Made it just Unit
 
Have you set the MyUnit to your unit? Like...

Events
- Map Initilization
Conditions
Actions
- Set MyUnit = Footman 0001 <gen>
- Custom Script: call UnitMakeAbilityPermanent(udg_MyUnit, true, 'A083')

Without that the variable is just an empty variable and it doesn't refer to anything.
 
Have you set the MyUnit to your unit? Like...

Events
- Map Initilization
Conditions
Actions
- Set MyUnit = Footman 0001 <gen>
- Custom Script: call UnitMakeAbilityPermanent(udg_MyUnit, true, 'A083')

Without that the variable is just an empty variable and it doesn't refer to anything.
Still not working

upload_2020-1-14_18-37-53.png


Even if i put this there
  • (Ability being cast) Equal to Snipe/Knife [W]
 
Does the unit already have that ability or not?
The original character is with sniper, he got that (snipe/knife) ability which changes him to another coppy of the hero but with knife and different abilities. When it changes to the other character (with the knife) it has only the snipe/knife ability (which is ok) but dont have any of the other abilities
 
Status
Not open for further replies.
Back
Top