• 🏆 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!

Help with passive shadow orb ability

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
He :D I've made a unit ability based off of the shadow orb item ability and I made it require an upgrade based on the adept train upgrades and while the ability successfully only works when the adept training upgrade is bought the orb attachment and Missile FX is active even though the upgrade for the ability has not been purchased. So :vw_unimpressed: all I want is for the FX's of the ability to only appear/show once the upgrade for the ability has been purchased

//P.S Hope explained things clear enough and thanks for any and all help
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
From the ability itself it's impossible. You'll have to trigger it. Once the research you want is done, you add the ability to the units you want. Just create a variable called WantedUnits and do this:

  • Add Shadow Orb
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to (The research needed)
    • Actions
      • Trigger - Turn off (This trigger)
      • Set WantedUnits = (Units owned by (Owner of (Researching unit)) matching ((Unit-type of (Matching unit)) Equal to [The unit-type that will have this skill]))
      • Unit Group - Pick every unit in WantedUnits and do (Unit - Add Shadow Orb Ability to (Picked unit))
      • Custom script: call DestroyGroup(udg_WantedUnits)
This is to be done if there's only one player doing that research. If there are multiple players, then create an array boolean variable of size (the number of players) named TechTypeResearched. Then add this condition from Boolean Comparison:

  • Conditions
    • TechTypeResearched[(Player number of (Owner of (Researching unit)))] Equal to False
And add this action as the first one:

  • Actions
    • Set TechTypeResearched[(Player number of (Owner of (Researching unit)))] = True
Remove this:

  • Actions
    • Trigger - Turn off (This trigger)
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
Firstly you shall create a dummy ability based on, for example, Channel or any other spell whose target is a single unit and whose effects can be cancelled (Chain Lightning, for instance, is just perfect).

  • Sacrifice Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sacrifice
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Mana of (Target unit of ability being cast)))
      • Unit - Kill (Target unit of ability being cast)
 
Level 9
Joined
Jun 10, 2013
Messages
473
Firstly you shall create a dummy ability based on, for example, Channel or any other spell whose target is a single unit and whose effects can be cancelled (Chain Lightning, for instance, is just perfect).

  • Sacrifice Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sacrifice
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Mana of (Target unit of ability being cast)))
      • Unit - Kill (Target unit of ability being cast)

Ok I just can't figure out how to add the part " + (Mana of (Target unit of ability being cast))) ''
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
Okay it works in the sense that the unit is killed but the building doesn't get its hitpoints converted into mana

Then I'm a bit confused. What does this skill do?

1- Convert the mana of the targeted unit into the hit points of the building?
2- Add the mana of the targeted unit to the hit points of the building?
3- Kill the targeted unit and swap the mana of the building with its hit points?

Or what exactly?
 
Level 9
Joined
Jun 10, 2013
Messages
473
So I understood it correctly. My trigger should do that so if it didn't work, then you did something wrong.

Then im not sure what I did then heres pics Screenshot (61).png
 

Attachments

  • Screenshot (60).png
    Screenshot (60).png
    148.8 KB · Views: 62
Level 21
Joined
Nov 4, 2013
Messages
2,017
Ok, now I understood the problem and what you want exactly.
The problem is that the hit points of the building will increase, not the mana :/ Basically you should just do this:

  • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (Mana of (Target unit of ability being cast)))
Use the function Set Mana (To Value)
100% sure this will work
 
Level 9
Joined
Jun 10, 2013
Messages
473
wondering if I can bug you again XD but I want to swap the corpse of my unit upon death with a grunts corpse I know you have to do some thing like


A Unit dies.
Wait some seconds until he falls in the ground.
Hide the unit and create a dummy unit that would be a dead grunt

just don't know how the trigger would look and be really
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
wondering if I can bug you again XD but I want to swap the corpse of my unit upon death with a grunts corpse I know you have to do some thing like


A Unit dies.
Wait some seconds until he falls in the ground.
Hide the unit and create a dummy unit that would be a dead grunt

just don't know how the trigger would look and be really

I need more information. Do you want a permanent grunt flesh, a temporary one or the decaying skeleton of a grunt?
 
Status
Not open for further replies.
Top