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

Dragon Breath v1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This spell is kind of an auto-firing fire breath, which depends on the current position of the casting unit.


Keywords:
dragon, breath, fly, fire, flame, pandaren, spell, glow, red
Contents

Noch eine WARCRAFT-III-Karte (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Required changes Add importing instructions You can get stuck in the middle of buildings and trees after the dragon form ends Suggested changes Remove upgrades used from dummies...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

Reviewed by Maker, Dragon Breath v1.1, 16th Jul 2012

Required changes
  • Add importing instructions
  • You can get stuck in the middle of buildings and trees
    after the dragon form ends
Suggested changes
  • Remove upgrades used from dummies
  • Locust is enough making dummies invulnerable,
    no need for separate invulnerability ability
  • Generally abilities have the same learn/use hotkey
  • Check number of units in group only after you remove a unit
    from the group, not during every loop

13:41, 1st Jun 2011
Maker:
Separate the visibility modifier actions from the hashtable creation trigger.
You don't have to null globals.
You could store the handle id's into integers and use the integer instead of calling Key(unit) function repeatedly.
You're overwriting the position stored in the hashtable, thus causing leaks.
Set the dummies to can't raise, does not decay.
The looping trigger should be initally off and turned off when no active instances of the spell are on.
 
Level 4
Joined
Feb 27, 2008
Messages
20
  • DragonBreathCast
    • Events
      • Einheit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dragon Breath
    • Actions
      • Set CLCaster = (Triggering unit)
      • Set CLFacing = (Facing of CLCaster)
      • Set CLOwner = (Owner of CLCaster)
      • Set CLPosition = (Position of CLCaster)
      • Unit - Create 1 Dummy Dragon for CLOwner at CLPosition facing CLFacing degrees
      • Set CLDummy = (Last created unit)
      • Set CLCount = 0
      • -------- Number of waves casted --------
      • Set CLMaxCount = (((Level of (Ability being cast) for CLCaster) + 2) x 10)
      • Set CLLevel = (Level of (Ability being cast) for CLCaster)
      • Hashtabelle - Save CLCount as (Key CLCount) of (Key (Last created unit)) in CLTable
      • Hashtabelle - Save CLMaxCount as (Key CLMaxCount) of (Key (Last created unit)) in CLTable
      • Hashtabelle - Save CLLevel as (Key CLLevel) of (Key (Last created unit)) in CLTable
      • Hashtabelle - Save CLFacing as (Key CLFacing) of (Key (Last created unit)) in CLTable
      • Hashtabelle - Save Handle OfCLCaster as (Key CLCaster) of (Key (Last created unit)) in CLTable
      • Hashtabelle - Save Handle OfCLPosition as (Key CLPosition) of (Key (Last created unit)) in CLTable
      • Hashtabelle - Save Handle OfCLOwner as (Key CLOwner) of (Key (Last created unit)) in CLTable
      • Animation - Change CLCaster's vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
      • Unit - Set CLCaster movement speed to 522.00
      • Animation - Change CLCaster turn speed to 1.00
      • Unit - Turn collision for CLCaster Off
      • -------- Animation of the dragon --------
      • Custom script: call SetUnitAnimationByIndex(udg_CLDummy,1)
      • Unit Group - Add CLDummy to CLGroup
      • Custom script: set udg_CLCaster = null
      • Custom script: set udg_CLDummy = null
  • DragonBreathLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • (Number of units in CLGroup) Greater than 0
    • Actions
      • Unit Group - Pick every unit in CLGroup and do (Actions)
        • Loop - Actions
          • Set CLDummy = (Picked unit)
          • Set CLCaster = (Load (Key CLCaster) of (Key (Picked unit)) in CLTable)
          • Set CLCount = (Load (Key CLCount) of (Key (Picked unit)) from CLTable)
          • Set CLMaxCount = (Load (Key CLMaxCount) of (Key (Picked unit)) from CLTable)
          • Set CLLevel = (Load (Key CLLevel) of (Key (Picked unit)) from CLTable)
          • Set CLPosition = (Load (Key CLPosition) of (Key (Picked unit)) in CLTable)
          • Set CLOwner = (Load (Key CLOwner) of (Key (Picked unit)) in CLTable)
          • Set CLFacing = (Load (Key CLFacing) of (Key (Picked unit)) from CLTable)
          • Hashtabelle - Save Handle Of(Position of CLCaster) as (Key CLPosition) of (Key (Picked unit)) in
  • CLTable
    • Hashtabelle - Save (Facing of CLCaster) as (Key CLFacing) of (Key (Picked unit)) in CLTable
    • Hashtabelle - Save (CLCount + 1) as (Key CLCount) of (Key (Picked unit)) in CLTable
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • 'IF'-Conditions
        • CLCount Less than CLMaxCount
        • (CLCaster is alive) Equal to True
      • 'THEN'-Actions
        • -------- Creating / casting of the fire breath casting unit --------
        • Set CLTempPoint = (CLPosition offset by 50.00 towards CLFacing degrees)
        • Unit - Create 1 Dummy Caster for CLOwner at CLTempPoint facing CLFacing degrees
        • Set CLTempUnit = (Last created unit)
        • Unit - Set level of Dragon Breath dummy for CLTempUnit to CLLevel
        • Unit - Order CLTempUnit to Neutral Pandarenen-Brewmaster - 'breathoffire' CLTempPoint
        • Unit - Add a 0.01 second Standard expiration timer to CLTempUnit
        • Unit - Move CLDummy instantly to CLPosition, facing CLFacing degrees
        • Custom script: call RemoveLocation(udg_CLPosition)
        • Custom script: call RemoveLocation(udg_CLTempPoint)
        • Custom script: set udg_CLTempUnit null
        • Custom script: set udg_CLCaster = null
        • Custom script: set udg_CLDummy = null
      • 'ELSE'-Actions
        • Animation - Change CLCaster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00%
  • transparency
    • Unit - Set CLCaster movement speed to (Default movement speed of CLCaster)
    • Animation - Change CLCaster turn speed to (Default turn speed of CLCaster)
    • Unit - Turn collision for CLCaster Ein
    • Unit Group - Remove CLDummy from CLGroup
    • Hashtabelle - Clear all child hashtables of child (Key (Picked unit)) in CLTable
    • Unit - Hide CLDummy
    • Unit - Add a 0.01 second Standard expiration timer to CLDummy
    • Custom script: call RemoveLocation(udg_CLPosition)
    • Custom script: set udg_CLCaster = null
    • Custom script: set udg_CLDummy = null
 
hmm, the object data damage I'm not too fond of, also, is there really any point in increasing the casters movement speed, and changing its vertex colouring to 100% 100% 100% can remove pre-existing tints in the object editor if I'm not mistaken.

Also I'd suggest returning the caster back to their original point after casting the spell, otherwise they may find themselves stuck in the middle of some trees.
 
Level 4
Joined
Aug 18, 2011
Messages
73
he hides the unit

  • Unit - Hide CLDummy
then he expiration timer for CLDummy

  • Unit - Add a 0.01 second Standard expiration timer to CLDummy
it will automaticly remove the unit after 0.01 sec
its ok guys!
and wont lag in game
 
Top