• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Solved] need help - custom abilities - basics (?)

Status
Not open for further replies.
Level 21
Joined
Mar 29, 2020
Messages
1,237
hey all,

I'm sure there are tutorials on this but I couldn't find them, so just pointing me in the right direction would be super helpful. how do I create custom abilities with functions not available by editing existing ones? I could create a seperate trigger for each one, but I know that's not what it is supposed to look like - I looked at a dota template and the abilities there that have no parallel in WC itself (target location modifiers like meat hook or greater bash for example) are not listed as triggers in the trigger editor. so how do I go about doing stuff like that?

(for clarity's sake - i want to make abilities that can do things like - sapping resources, issuing commands to other player's units, manipulating items held by other players etc')

thanks!
 
Level 12
Joined
Jan 30, 2020
Messages
875
Hello there.

It depends on the effect you want the custom ability to have, but in general in implies creating a dummy version of your ability in the object editor, removing all possible effects, and then detect when the ability is cast (usually people use the event - a unit starts the effect of an ability) and then create the effects manually with triggers.

Sometimes, but not in the cases of the abilities you are listing, you will also need a dummy unit (or several depending on the situation) to do the work.
I personally have some custom abilities that do specific things to the target (moving it to a new location while reducing its hp, or forcing it to move to another location).

I have also made custom abilities with no target to cast an ability that targets units in range.
My favorite dummy ability for that is the Summon Water Elemental, because you can control the timed life of the dummy unit that way directly from the object editor
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
thanks, I still don't understand - basically this way i will end up with a seperate trigger (or multiple triggers) for each custom ability?

how do other mods have abilities that aren't listed on the trigger editor? (e.g. dota)

thanks!
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,906
Spells like Greater Bash in dota are Passive and won't use the "A unit starts the effect of an ability" Event. They're most likely used with a Damage Engine. Damage Engine 5.5.0.0

That aside, DotA might also be made entirely in vJass which is Code/Script instead of GUI (Actions/Conditions/Events). You won't see many if not any standard GUI triggers if this is the case.

GUI = The standard Trigger Editor. You select Events, add Conditions if needed, and add Actions that you want to happen when the Events go off.
Here's an example. When any unit casts Thunder Clap it will be killed:
  • Thunderclap Example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Unit - Kill (Triggering unit)
vJass/Lua/Other = This is code that enables you way more freedom and control over your triggers. It's more advanced and requires programming knowledge but it's worth it in the long run.
Here's an example made in Lua. When any unit casts an ability it will be killed:
Lua:
function KillCastingUnit()
    local trigger = CreateTrigger()
    TriggerRegisterAnyUnitEventBJ(trigger, EVENT_PLAYER_UNIT_SPELL_CAST)
    TriggerAddAction(trigger, function()
        KillUnit(GetTriggerUnit())
    end)
end

So if you want to create GUI triggers then you should use my Thunderclap Example trigger as a template. Change the Condition to match your ability and edit the Actions to do what you want. I imagine you could recreate 99% of DotA in GUI (with some Custom Script sprinkled here and there) but it certainly wouldn't be pretty.

If you plan on investing a good amount of time into mapmaking then I recommend learning how to code since it'll pay off in the end.
 
Last edited:
Level 16
Joined
May 2, 2011
Messages
1,345
IIRC (if I remember correctly), Greater bash spell can be found on Hive in some Hashtable Tutorial by Bribe or Maker (I forgot which one did it).
I downloaded the map 8 years ago or so.

Credit is not mine. Credit is due to whoever created this map years ago on hive. will link when I find the tutorial again by editing this post. I might also delete this file since it will be available on that link, but for now you can take a look at this.
 

Attachments

  • Hashtable%20Tutorial.w3x
    27.3 KB · Views: 16
Status
Not open for further replies.
Top