• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Templar Assassin Meld

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Basically the caster becomes invisible as long as he remains still. If Meld's invisibility is broken by attacking an enemy, it will deal bonus damage to the enemy and reduce their armor. Moving cancel the invisibilty.

How to do this ? Which ability should I base off to do this ? And then... do what ?
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Make dummy cast Invisibility on the caster, set boolean variable to true.
Use DDS to detect when unit takes damage, check if source is the caster and if bool == true. If yes, deal bonus damage, apply armor reduction, set bool to false.
 

EdgeOfChaos

E

EdgeOfChaos

This is a skill I made for one of my RPGs: Ambush. Here's the code and tooltip, feel free to use it however you want. It's not exactly what you want but can be easily changed to be. Based off the ability Channel. Base order string changed to coldarrowstarg

Description:
The crocodile disguises himself, preventing all damage. Upon moving, the disguise will break. Casting Ambush when you already disguised, the crocodile strikes at all units adjacent to him, dealing damage based on attack power and spell power.

Code:

  • Ambush
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |cff464646Ambush|r
    • Actions
      • Set TempUnit = (Casting unit)
      • Set TempInteger = (Custom value of TempUnit)
      • Set TempPoint = (Position of TempUnit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Disguised[TempInteger] Equal to False
        • Then - Actions
          • Unit - Order TempUnit to Hold Position
          • Animation - Change TempUnit's vertex coloring to (52.00%, 52.00%, 100.00%) with 70.00% transparency
          • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set Disguised[TempInteger] = True
          • Unit - Make TempUnit Invulnerable
          • Unit - Add classification of A peon-type unit to TempUnit
        • Else - Actions
          • Set SpellDamage = (((Real((Agility of TempUnit2 (Include bonuses)))) x 1.50) + ((Real((Intelligence of TempUnit2 (Include bonuses)))) x 0.33))
          • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Orc\OrcLargeDeathExplode\OrcLargeDeathExplode.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set TempGroup = (Units within 300.00 of TempPoint matching (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True))
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • Custom script: call DisplayDamage(udg_TempUnit,GetEnumUnit(),udg_SpellDamage)
          • Custom script: call DestroyGroup(udg_TempGroup)
          • Unit - Order TempUnit to Stop
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Cancel Disugise OnAttack
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set TempUnit2 = (Attacking unit)
      • Set TempInteger2 = (Custom value of TempUnit2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Disguised[TempInteger2] Equal to True
        • Then - Actions
          • Set SpellDamage = (((Real((Agility of TempUnit2 (Include bonuses)))) x 1.50) + ((Real((Intelligence of TempUnit2 (Include bonuses)))) x 0.33))
          • Animation - Change TempUnit2's vertex coloring to (52.00%, 52.00%, 100.00%) with 0.00% transparency
          • Set Disguised[TempInteger2] = False
          • Unit - Make TempUnit2 Vulnerable
          • Unit - Remove classification of A peon-type unit from TempUnit2
        • Else - Actions
  • Cancel Disguise OnOrder
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Not equal to (Order(coldarrowstarg))
      • (Issued order) Not equal to (Order(channel))
    • Actions
      • Set TempUnit2 = (Ordered unit)
      • Set TempInteger2 = (Custom value of TempUnit2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Disguised[TempInteger2] Equal to True
        • Then - Actions
          • Animation - Change TempUnit2's vertex coloring to (52.00%, 52.00%, 100.00%) with 0.00% transparency
          • Set Disguised[TempInteger2] = False
          • Unit - Make TempUnit2 Vulnerable
          • Unit - Remove classification of A peon-type unit from TempUnit2
        • Else - Actions
 
Last edited by a moderator:
Status
Not open for further replies.
Top