🏆 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!
The dark soul reaches the mid-air, diverging into multiple dark souls that will haunt the enemy units when landed. ( a perfectly howl of terror pitched effect )
The multiple dark souls splitted into mini souls when landed in a visualized motion.
Damages and frightens the enemy units when landed.
[TD]
CHANGELOGS
:[/TD][TD]
v1.0 - Fresh Released
v1.1 - Updated based on KILLCIDE's review[/TD]
[TD]
CREDITS
:[/TD][TD] Bribe
( Unit Indexer System ) Jad
( KB3D System ) Maestros
( Fear System )
[/TD]
Dark Bow Configuration
Dark Bow Cast
Dark Bow Loop
Dark Bow Configuration
Events
Map initialization
Conditions
Actions
-------- --------
-------- * SPELL CONFIGURATION FIELD * --------
-------- --------
-------- OBJECT EDITOR ( F6 ) --------
-------- The spell or ability used in the triggers. ( Import the Dark Bow Ability ) --------
Set DB_Ability = Dark Bow
-------- The dummy unit type used in the trigger. ( Import the Dark Bow Dummy ) --------
Set DB_DummyType = Dark Bow Dummy
-------- The spell or ability that the dummy unit will use to fear enemy units. ( Import the Fear Dummy Ability and Fear System ( Maestros ) Folder ) --------
Set DB_FearAbility = Fear ( Dummy Ability )
-------- --------
-------- SPELL DATA --------
-------- - --------
-------- The maximum level of the spell or ability. ( Number of Levels from Dark Bow Ability ) --------
Set DB_AbilityMaxLevel = 3
-------- - --------
-------- An effect occurs at the attachment point when the caster executes the spell or ability. --------
Set DB_Effect[1] = Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
Set DB_EffectAttach[1] = weapon
-------- - --------
-------- The maximum radius of the spell or ability to the targeted location or area. --------
Set DB_Radius[1] = 300.00
Set DB_Radius[2] = 325.00
Set DB_Radius[3] = 350.00
-------- - --------
-------- Destroy Trees? True = Yes, False = No --------
Set DB_DestroyTrees = False
-------- - --------
-------- The attack type and damage type of the spell or ability. --------
Set DB_AttackType = Spells
Set DB_DamageType = Normal
-------- - --------
-------- The artificial ground height where units' height will be detected. ( Default: 10 ) --------
Set DB_FloorHeight = 10.00
-------- - --------
-------- The applied artificial gravity in the map where falling or landing of units involved. ( Default: -9.81 ( Earth's Gravity ) ) --------
Set DB_Gravity = -9.81
-------- ^ Modify at your own risk: gravity changes affects the falling, landing motion of units. ( High Gravity = -100+, Normal Gravity = -40- ) --------
-------- - --------
-------- The interval of the looping trigger. ( Default: 1 second / 32 iterations, frames = 0.03125000 ) --------
Set DB_LoopInterval = (1.00 / 50.00)
-------- ^ I've modified it to ( 1 second / 50 iterations, frames = 0.02 ) for smooth visuals. --------
-------- ^ Modify at your own risk: Changing the value affects the spell's performance. --------
-------- - --------
-------- --------
-------- HEAD DATA --------
-------- - --------
-------- The art model used to attach in the main projectile. --------
Set DB_Effect[2] = Abilities\Weapons\ZigguratMissile\ZigguratMissile.mdl
Set DB_EffectAttach[2] = origin
-------- And it's pitch facing upward ( It will rise to the air ). The modified value is recommended. ( Default: +40 ) --------
Set DB_PitchVariation[1] = 0.00
-------- ^ If the art model have already pitch animation and you don't want to set it's pitch then set this value to 0. --------
-------- - --------
-------- The size of the main projectile. --------
Set DB_HeadSize[1] = 1.25
Set DB_HeadSize[2] = 1.25
Set DB_HeadSize[3] = 1.25
-------- - --------
-------- The initial height of the main projectile. --------
Set DB_HeadHeight[1] = 75.00
Set DB_HeadHeight[2] = 75.00
Set DB_HeadHeight[3] = 75.00
-------- - --------
-------- The maximum height of the main projectile to split. ( Mid-Air ) --------
Set DB_HeadMaxHeight[1] = 375.00
Set DB_HeadMaxHeight[2] = 425.00
Set DB_HeadMaxHeight[3] = 475.00
-------- - --------
-------- The speed of the main projectile. ( Distance Per Second ) --------
Set DB_HeadSpeed[1] = 1200.00
Set DB_HeadSpeed[2] = 1200.00
Set DB_HeadSpeed[3] = 1200.00
-------- - --------
-------- The creation or spawn range of the main projectile away from the caster. --------
Set DB_SpawnOffset = 25.00
-------- - --------
-------- The distance divider from the caster's position to the targeted location. This is the seperated distance where the head will split. ( Default: 1.75 ) --------
Set DB_DistanceSeperation = 1.75
-------- ^ Modify at your own risk: Lowering the value can cause some errors. There's no need to change this value by the way. --------
-------- - --------
-------- --------
-------- SHARDS DATA --------
-------- - --------
-------- The art model used to attach in the shards. --------
Set DB_Effect[3] = Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
Set DB_EffectAttach[3] = origin
-------- And it's pitch facing downward ( It will land to the ground ). The modified value is recommended. ( Default: -20 ) --------
Set DB_PitchVariation[2] = 0.00
-------- ^ If the art model have already pitch animation and you don't want to set it's pitch then set this value to 0. --------
-------- - --------
-------- An effect occurs at the attachment point of the main projectile when the shards splitted and it's pitch facing. ( for better pitching the effect ) --------
Set DB_Effect[4] = Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
Set DB_EffectAttach[4] = origin
Set DB_PitchVariation[3] = -90.00
-------- ^ PitchVariation values range from +90 to -90 only. ( Negative Values = faces downward, Positive values = faces upward ) ( Default: -90 ) --------
-------- ^ If you want to disable the pitch facing then set this value to 0. --------
-------- - --------
-------- The size of the shards. --------
Set DB_ShardSize[1] = 1.00
Set DB_ShardSize[2] = 1.00
Set DB_ShardSize[3] = 1.00
-------- - --------
-------- The amount of shards splitted. Value != 0 --------
Set DB_ShardAmount[1] = 8
Set DB_ShardAmount[2] = 12
Set DB_ShardAmount[3] = 16
-------- - --------
-------- The landing time of the shards. --------
Set DB_ShardFallTime[1] = 0.50
Set DB_ShardFallTime[2] = 0.45
Set DB_ShardFallTime[3] = 0.40
-------- - --------
-------- The collision radius of the shards. --------
Set DB_ShardCollision[1] = 50.00
Set DB_ShardCollision[2] = 65.00
Set DB_ShardCollision[3] = 80.00
-------- - --------
-------- The damage of each shards in collision radius. --------
Set DB_ShardDamage[1] = 100.00
Set DB_ShardDamage[2] = 200.00
Set DB_ShardDamage[3] = 300.00
-------- - --------
-------- An effect occurs when the shards landed. --------
Set DB_Effect[5] = Abilities\Spells\Undead\OrbOfDeath\AnnihilationMissile.mdl
-------- - --------
-------- Shards scatter into pieces when landed? True = Yes, False = No --------
Set DB_ShardScatter = True
-------- ^ IF: TRUE = Import the KB3D System ( Jad ). --------
-------- ^ IF: FALSE = Please skip the MINI DATA configuration section and leave or ignore KB3D System ( Jad ). --------
-------- - --------
-------- --------
-------- MINI DATA --------
-------- - --------
-------- The art model used to attach in the mini projectiles. --------
Set DB_Effect[6] = Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
Set DB_EffectAttach[5] = origin
-------- - --------
-------- The size of the mini projectiles. --------
Set DB_MiniSize[1] = 0.40
Set DB_MiniSize[2] = 0.40
Set DB_MiniSize[3] = 0.40
-------- - --------
-------- The amount of the created mini projectiles. Value != 0 --------
Set DB_MiniAmount[1] = 3
Set DB_MiniAmount[2] = 3
Set DB_MiniAmount[3] = 3
-------- - --------
-------- The range of the mini created projectiles. --------
Set DB_MiniRange[1] = 175.00
Set DB_MiniRange[2] = 375.00
Set DB_MiniRange[3] = 500.00
-------- - --------
-------- The maximum height of the mini projectiles can reach. --------
Set DB_MiniMaxHeight[1] = 150.00
Set DB_MiniMaxHeight[2] = 75.00
Set DB_MiniMaxHeight[3] = 150.00
-------- - --------
-------- The speed of the mini projectiles. ( Distance Per Second ) --------
Set DB_MiniSpeed[1] = 250.00
Set DB_MiniSpeed[2] = 250.00
Set DB_MiniSpeed[3] = 275.00
-------- - --------
-------- The collision radius of the mini projectiles. --------
Set DB_MiniCollision[1] = 35.00
Set DB_MiniCollision[2] = 35.00
Set DB_MiniCollision[3] = 35.00
-------- - --------
-------- The damage of the mini projectiles in collision radius. --------
Set DB_MiniDamage[1] = 50.00
Set DB_MiniDamage[2] = 75.00
Set DB_MiniDamage[3] = 100.00
-------- - --------
-------- Allow the mini projectiles arc trajectory? True = Yes, False = No --------
Set DB_MiniEnableArc = True
-------- - --------
-------- An effect occurs to the enemy units when damaged by mini projectiles. --------
Set DB_Effect[7] = Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
-------- - --------
-------- --------
-------- FEAR DATA --------
-------- FEAR CONFIGURATIONS/SETTINGS ARE INSIDE THE FEAR SYSTEM FOLDER " MF Settings " TRIGGER. --------
Set DB_Fear = True
-------- ^ Fear the units damaged by the dark souls? True = Yes, False = No --------
-------- ^ IF: TRUE = Import the Fear System ( Maestros ), Fear Dummy Ability. --------
-------- ^ IF: FALSE = Leave or ignore the Fear System ( Maestros ) and don't import the Fear Dummy Ability. --------
Custom script: function DB_InPlayableArea takes real x, real y returns boolean // Detects X/Y coordinates inside the playable area
Custom script: return x < udg_DB_Map[ 2 ] and x > udg_DB_Map[ 1 ] and y < udg_DB_Map[ 4 ] and y > udg_DB_Map[ 3 ]
Custom script: endfunction
Custom script:
Custom script: function DB_Move takes unit u, real motionX, real motionY, boolean b returns nothing // Moving a unit in the specific valid X/Y coordinates
Custom script: if DB_InPlayableArea( motionX, motionY ) then
Custom script: call SetUnitX( u, motionX )
Custom script: call SetUnitY( u, motionY )
Custom script: elseif b == false then
Custom script: call SetUnitX( u, motionX )
Custom script: call SetUnitY( u, motionY )
Custom script: endif
Custom script: endfunction
Custom script:
Custom script: function DB_Parabola takes real mH, real mD, real cD returns real // Curving the projectile's trajectory
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DB_ShardCurrentDistance[DB_ID] Greater than or equal to DB_ShardLandDistance[DB_ID]
Then - Actions
-------- --------
-------- * FEAR SYSTEM * --------
Custom script: call GroupEnumUnitsInRange( bj_lastCreatedGroup, x , y , udg_DB_ShardCollision[ udg_DB_Level[ udg_DB_ID ] ], null )
Custom script: loop
Custom script: set udg_DB_PickedUnit = FirstOfGroup( bj_lastCreatedGroup )
Custom script: exitwhen udg_DB_PickedUnit == null
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DB_PickedUnit is dead) Equal to False
(DB_PickedUnit is A structure) Equal to False
(DB_PickedUnit is Magic Immune) Equal to False
(DB_PickedUnit is A flying unit) Equal to False
(DB_PickedUnit is Mechanical) Equal to False
(DB_PickedUnit belongs to an enemy of DB_CasterPlayer[DB_ID]) Equal to True
Then - Actions
-------- --------
Unit - Cause DB_Caster[DB_ID] to damage DB_PickedUnit, dealing DB_ShardDamage[DB_Level[DB_ID]] damage of attack type DB_AttackType and damage type DB_DamageType
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DB_Fear Equal to True
Then - Actions
-------- --------
-------- Dummy Caster --------
Custom script: set udg_DB_DummyUnit = CreateUnit( udg_DB_CasterPlayer[ udg_DB_ID ] , udg_DB_DummyType , x , y , 0 )
The effects are cool, and the spell concept is good, but the code... ugh why must you torture me? Regardless, giving it a quick overview because my eyes hurt from walls of black text, I only saw a couple of things that can be improved:
It's faster to...
That's a lot of custom script. anyway casually scrolled through (didn't really read) but I thought I'd point out that GetUnitX/Y is faster than GetWidgetX/Y
^ Still doubting at that fear system, Im actually thinking that the global dummy unit is the responsible for this issue or its owner PLAYER_NEUTRAL_EXTRA ( actually ive discovered that any unit owns by this player will automatically follow the neutral guard distance on gameplay constants ) so Ill remove this dummy player config part, about the global dummy unit ( im actually wrong about the idea of ordering the single dummy to target multiple units at the same time. ) so Ill just create.another dummy manually to make it follow properly.
About that setpitch function, it is just a constant angle value ^^.
* Removed dummy player configuration
* Removed the global dummy unit onInit
* Changed GetWidgetX/Y to UnitX/Y native. ( faster )
* Tree Destroy location now used to move not create. ( efficient )
* Uses integer as a checker instead of enum. ( efficient )
* Fear now works properly on enemy units damaged by the diverged missiles.
The effects are cool, and the spell concept is good, but the code... ugh why must you torture me? Regardless, giving it a quick overview because my eyes hurt from walls of black text, I only saw a couple of things that can be improved:
It's faster to just multiply the number itself instead of using the Pow() native
Custom script: set g = ( udg_DB_Gravity * udg_DB_CurrentHeight[ udg_DB_ID ] ) * Pow( udg_DB_LoopInterval, 2 )
Dont worry Ill submit later my last GUI spell ( coded plain GUI ) but of course for moving it is exception, After that spell Ill move on and switch to JASS
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.