• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Skill Inquiries

Status
Not open for further replies.
Level 3
Joined
Jul 30, 2013
Messages
25
How to create the skill which is similar to Earthshaker's skill Enchant Totem (increases damage and lasts only for 1 attack) using simple GUI?

Thank you.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
How to create the skill which is similar to Earthshaker's skill Enchant Totem (increases damage and lasts only for 1 attack) using simple GUI?

Thank you.

1. You will need to create an instant abilities which does nothing (preferably using channel) and this is the ability that you will give to the hero (Enchant Totem).
2. Create a dummy unit
3. Create an ability based on Inner Fire (I choose Inner Fire because it gives %bonus damage as Earthshaker's Enchant Totem does) which has the same level as your main ability (Enchant Totem).
4. Remember to create a buff for Inner Fire ability so we would be able to detect when the hero has the buff or not.
5. You need a damage detection system so when the hero that has a buff of Enchant Totem attacks will lose the buff afterwards. Here in the trigger example, i used Bribe's Damage Engine. and then do as follow.
  • Twohand Quicken
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Enchant Totem
    • Actions
      • Set tempLoc = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Triggering player) at tempLoc facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Inner Fire to (Last created unit)
      • Unit - Set level of Inner Fire for (Last created unit) to (Level of Enchant Totem for (Triggering unit))
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Triggering unit)
      • Custom script: call RemoveLocation(udg_tempLoc)
  • Sa Damage
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff Enchant Totem ) Equal to True
    • Actions
      • Unit - Remove Enchant Totem buff from DamageEventSource
EDIT : I hope I don't confuse you too much, I can provide you a test map if you ever need one.
 
Last edited:
Level 3
Joined
Jul 30, 2013
Messages
25
One short question. As I am very very new to World Editor, why is it necessary to put the action of custom script: call RemoveLocation(udg_tempLoc)?
 
Level 25
Joined
Sep 26, 2009
Messages
2,408
One short question. As I am very very new to World Editor, why is it necessary to put the action of custom script: call RemoveLocation(udg_tempLoc)?
When you want to create unit somewhere, you also create a location (e.g. you create dummy at (position of (triggering unit)) - this creates new location and upon it you create dummy). Each location takes a bit of your pc's memory.
tempLoc is a variable and it points to where the location is. The custom script "call RemoveLocation" removes the location that tempLoc variable points to, so it destroys this location and so your game takes less of your pc's memory.

If you don't do this, you will create many locations and have no way to remove them -- you will create locations and leave them in game even if they will never be used again => all will take more and more of your PC's memory. If too many accumulate, they will slow down your game (fps drops), worst case may even cause crash.

A location, which is no longer accessible and still remains in game is what people call here *leak* aka *memory leak*.

Locations are not the only thing that causes leaks, there are special effect, groups, etc.
This thread: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/ explains what leaks and how to remove those leaks.
 
Level 3
Joined
Jul 30, 2013
Messages
25
I mean the variables: DamageEvent, DamageEventTarget, DamageEventSource, what should I set or what should I do with them?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Those variables, I have to make it myself? It's tough...

You don't have to. When you want to import the GUI Damage Engine, make sure you tick the option "Automatically creates unknown variables when pasting trigger data" in the File > Preferences. I am sorry I didn't tell you this earlier.

If you have done the above, all those variables (DamageEvent, DamageEventTarget, & DamageEventSource) will automatically provided.
 
Level 3
Joined
Jul 30, 2013
Messages
25
Wow, very thank you for your big help~

EDIT1: Erm, the buff is not removed after the attack.

EDIT2: Oh, found the problem. Thank you very very much.
 
Last edited by a moderator:
Level 23
Joined
Oct 12, 2008
Messages
1,783
Theyre actually much easier ways to get this done.

You could base the ability off Roar, removing the need for dummy casters and dummy inner fire mechanics.

You could use Command Aura, once again bypassing the above requirements and also making sure the buff stacks with whatever friendly buffs there might be.
 
Level 3
Joined
Jul 30, 2013
Messages
25
The trigger part 2, I somehow found that after using the skill, I gained the buff, I attack any enemy, the buff disappears, it works properly. But the main issue is after I gained the buff, I use spells, it disappears as well.
So, how do I limit this into just only attack removes the buff, not skills/spells?
Thank you.

P.S. How to put the picture with triggers into the post?
 
Status
Not open for further replies.
Top