• 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.

Ability with Charges

Status
Not open for further replies.
Level 4
Joined
May 1, 2011
Messages
81
Hi there. It's been for last 2 years ever since I logged in my account due to my losing interest on World Editor. But recently I have regain back my interest to continue creating a project which will see StarCraft abilities and units imported to play in Warcraft III.

Anyway, I have an issue here. In StarCraft, the Terran Vulture has an ability called Spider Mine, which the unit would dig a burrowed mine and will blow up if any enemy came near into it. If this device were to use in Warcraft, then Goblin Land Mines are most likely the ones we should substitute.

However what is important about Spider Mines is that it is a charged ability, and the skill will be removed once all 3 mines were planted. So how to do that in World Editor? I know there is a similar ability from Night Elves called Sentinel where units will be able plant invisible owls at trees in charged amounts but that's about it. You can't change to other units (unless using Sentry Ward ability but I want a charged ability) and it is has to target something and not freely.

Is it possible to do that? Any help will be highly appreciated.
 
Level 12
Joined
Nov 3, 2013
Messages
989
The Night Elf ability "Sentinel" is the only ability with Charges in wc3, I think. You'd have to trigger the effect but more importantly the base ability needs a target so you'd probably have to detect when the player press the custom sentinel ability, add another ability to the unit and then
  • Game - Force Player 1 (Red) to press the key (hotkey for the custom ability)
Something like this I guess:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability (this won't actually work)
    • Conditions
      • (Ability being cast) Equal to Sentinel (this won't actually work)
    • Actions
      • Game - Force Player 1 (Red) to press Escape/Cancel
      • Game - Force Player 1 (Red) to press the key E
I don't know any way to detect a player pressing an ability button in GUI but I think you can do it with Jass, can't really help you with that though. Closest I know in GUI is:
  • Player - Player 1 (Red) Presses the Left Arrow key
Edit: Realised you wouldn't need a second trigger or even a location since Spider Mine is created at the casters position like a normal summon spell.
 
Last edited:
Otherwise you need track the ability.

Something like.

Event - A unit starts the effect of an ability
Conditions - Ability being cast Equal to Spider Mine Abil
Actions -
Set Temp_Point = Target point of ability being cast
Create 1 Spider Mine Unit at Temp_Point
Custom script: call RemoveLocation (udg_Temp_Point)
Set level of Spider Mine Abil for triggering unit to (level of Spider Mine Abil for triggering unit + 1)
If -
Level of Spider Mine Abil for triggering unit Equal to 4
Then -
Remove Spider Mine Abil from triggering unit
Else -

Have the Spider Mine Ability have 4 levels.
All levels will have identical descriptions, perhaps with a charge indicator.
 
Status
Not open for further replies.
Top