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

Zephyr Contest #9 - Assassination

Status
Not open for further replies.

Cokemonkey11

Code Reviewer
Level 29
Joined
May 9, 2006
Messages
3,516
I have an epic idea for this contest, and the fact that mag is the judge is just icing on the cake.

But I'm not sure if I'll have time to do it. 4 weeks is more than plenty for 1 skill, I just mean that I'm not sure if I'll be able to dedicate time during that duration to make what I want!

We'll see what happens. Good luck to everyone who's already started ;)
 
I'm in. But there's a problem: I'm not creative at all, so I expect to get 0/10 in Concept section.

I'm not creative as well :D

and the fact that mag is the judge is just icing on the cake.

Aww, yay ^^

-----------

Good luck to everyone participating in this contest!
And remember, readability is just as important as efficiency ;D
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I wanna ask a simple question.
Why do contest like this has a long deadline ?
I can understand some of the spell making contest takes a month (if the contest's theme is about a Spell Pack or create more than 1 abilities) but making 1 spell for 1 month ?
Even for a new Spell Maker, I can bet they can take a maximum of 7 days to create a spell.
If we shorten it, we can take the advantage and create like 2-3 more contests in a month.

I'm just curious why the deadline is so long, can anyone clarify this to me ?
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
I can understand some of the spell making contest takes a month (if the contest's theme is about a Spell Pack or create more than 1 abilities) but making 1 spell for 1 month ?

Zephyr's tend to promote the best of the best spells, for those you need time to refine the code as well as the concept.

Also... it took time to get even this hosted, the idea has been pending quite a long time.

You gotta factor in it's vacation time also, so this keeps it simple and fair.
 
Level 5
Joined
Apr 11, 2011
Messages
107
"Notice the use of "skill"; skill or talent would accompany the assassination theme. A spellcaster would hardly be called 'assassin' in the fantasy world. Based on this, the concept might be defective the other way around."


i find a small problem/disagreement with this. i am an avid D&D player and have came across a spell thief/assassin class known as the beguiler.

sadly i have no real skill in triggering/jass so i wont be able to create anything for this contest. i would just love to see some fancy assassination SPELLS.

food for thought: D&D Beguiler
 
Level 33
Joined
Apr 24, 2012
Messages
5,113
Here is my spell entry:
Shadow Shroud
Zephyr Contest#9 Spell Entry
Screenshot
217293-albums5569-picture59442.jpg
Tooltip
The Assasin wears a mystical coat from the depths of the abyss,which is said to collect souls.Shadow Shroud has Passive and Active Effects:

|cffffcc00Passive|r:

If there are any enemy hero units nearby,Assasin will gain 100% transparency and disables minimap icon viewing for enemies of the Assasin.If the life of the Assasin drops to 200/250/300,Assasin will gain Shadow Walk for 5 seconds if there are any charges left else will lost a charge.Also gains charges every 15 seconds.

|cffffcc00Active|r:

Activate to apply Shadow Walk to the Assasin for 5 seconds .Decreases a charge.

|cffffcc00Effects|r:

|cffffcc00Shadow Walk|r:
Allows the Assasin to gain Collision off,1/3/5%MP and HP regeneration based on max life and mana of the Assasin,Permanent Invisibility without Fading and deals 1/1.5/2 x Agi of the Assasin for every attack made by the Assasin.


Maximum of 4 charges.
Triggers
[trigger=Configuration]SS Config
Events
Map initialization
Conditions
Actions
Custom script: set udg_SS_Hash = InitHashtable()
-------- Objects used --------
Set SS_Abilties[1] = Shadow Shroud
Set SS_Abilties[2] = SS Invisibility
-------- Unit Used --------
Set SS_Unit = SS Shadow Dummy
-------- Config --------
-------- GENERAL --------
-------- Determines the max charges --------
Set SS_MaxCharges = 4
-------- Determines the color of charges --------
-------- if 0(Black) --------
Set SS_Color[0] = |c00000000
-------- if 1(Red) --------
Set SS_Color[1] = |c00FF0000
-------- if 2(Orange) --------
Set SS_Color[2] = |c00FF7F00
-------- if 3(Yellow) --------
Set SS_Color[3] = |c00FFFF00
-------- if 4(Green) --------
Set SS_Color[4] = |c0000FF00
-------- Determines the text for the charges --------
-------- if 0 --------
Set SS_ChargeText[0] = (SS_Color[0] + I I I I|r)
-------- if 1 --------
Set SS_ChargeText[1] = (SS_Color[1] + (I|r + (SS_Color[0] + I I I|r)))
-------- if 2 --------
Set SS_ChargeText[2] = (SS_Color[2] + (I I|r + (SS_Color[0] + I I|r)))
-------- if 3 --------
Set SS_ChargeText[3] = (SS_Color[3] + (I I I|r + (SS_Color[0] + I|r)))
-------- if 4 --------
Set SS_ChargeText[4] = (SS_Color[4] + I I I I|r)
-------- Determines the Charge making loop --------
Set SS_MaxTimer = 15.00
-------- PASSIVE --------
-------- Determines the radius of hero detect --------
Set SS_DetectRadius = 1750.00
-------- Determines the life detector(to trigger Passive invisibility) --------
Set SS_LifeDetect[1] = 200.00
Set SS_LifeDetect[2] = 250.00
Set SS_LifeDetect[3] = 300.00
-------- Determines the transparency given to the learner --------
Set SS_Transparency = 100.00
-------- (NOTE:0.01 is the percentage of the regeneration-) --------
-------- (This is based on the max life of the learner) --------
-------- ACTIVE --------
-------- Determines how long does the invisibility last --------
Set SS_Duration = 5.00
-------- Determines the multiplier for the AGI --------
Set SS_AgiX[1] = 1.00
Set SS_AgiX[2] = 1.50
Set SS_AgiX[3] = 2.00
-------- Determines the regeneration given to the learner --------
-------- Life --------
Set SS_LifeRegen[1] = 0.01
Set SS_LifeRegen[2] = 0.03
Set SS_LifeRegen[3] = 0.05
-------- Mana --------
Set SS_ManaRegen[1] = 0.01
Set SS_ManaRegen[2] = 0.03
Set SS_ManaRegen[3] = 0.05
-------- SFX --------
Set SS_SFX = war3mapImported\SoulAegis.mdx
-------- (Credits to JetFangInferno for the model) --------
Set SS_SFX_2 = Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
[/trigger][trigger=Learn]SS Learn
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Shadow Shroud
Actions
-------- Variables --------
Set SS_Learner = (Learning Hero)
Custom script: set udg_SS_LearnerKey = GetHandleId(udg_SS_Learner)
Set SS_LearnLevels = (Level of SS_Abilties[1] for SS_Learner)
-------- Attaching Special Effect --------
Special Effect - Create a special effect attached to the chest of SS_Learner using SS_SFX
-------- Saving --------
Hashtable - Save (SS_CurrentCharges + 1) as 0 of SS_LearnerKey in SS_Hash
Hashtable - Save SS_Timer as 2 of SS_LearnerKey in SS_Hash
-------- Starting Loops --------
Unit Group - Add SS_Learner to SS_LoopGroup
Trigger - Turn on SS Loop <gen>
[/trigger][trigger=Cast]SS Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to SS_Abilties[1]
Actions
-------- Variables --------
Set SS_Caster = (Triggering unit)
Custom script: set udg_SS_CasterKey = GetHandleId(udg_SS_Caster)
Set SS_CurrentCharges = (Load 0 of SS_CasterKey from SS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_Caster is in SS_InviGroup) Not equal to True
Then - Actions
-------- Variables --------
Set SS_CurrentDuration = 0.00
Hashtable - Save SS_CurrentDuration as 3 of SS_CasterKey in SS_Hash
-------- Adding Permanent Invisibility --------
Unit - Add SS_Abilties[2] to SS_Caster
Unit - Set level of SS_Abilties[2] for SS_Caster to (Level of Shadow Shroud for SS_Caster)
-------- Starts the loop --------
Unit Group - Add SS_Caster to SS_InviGroup
-------- Removing a charge --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_CurrentCharges Greater than 0
Then - Actions
Hashtable - Save (SS_CurrentCharges - 1) as 0 of SS_CasterKey in SS_Hash
Else - Actions
Else - Actions
-------- Saving Variables --------
Hashtable - Save (SS_CurrentDuration - SS_Duration) as 3 of SS_CasterKey in SS_Hash
Hashtable - Save (SS_CurrentCharges - 1) as 0 of SS_CasterKey in SS_Hash
[/trigger][trigger=Loop]SS Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in SS_LoopGroup and do (Actions)
Loop - Actions
Set SS_Looper = (Picked unit)
Custom script: set udg_SS_LooperKey = GetHandleId(udg_SS_Looper)
-------- Load --------
Set SS_CurrentCharges = (Load 0 of SS_LooperKey from SS_Hash)
Set SS_Timer = (Load 2 of SS_LooperKey from SS_Hash)
-------- Checking --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_Looper is alive) Equal to True
Then - Actions
-------- Variables --------
Set SS_LooperLoc = (Position of SS_Looper)
Set SS_LoopLevels = (Level of SS_Abilties[1] for SS_Looper)
Set SS_LoopCurrentLife = (Life of SS_Looper)
-------- Starts Unit Detection --------
Set SS_DetectedUnits = (Units within SS_DetectRadius of SS_LooperLoc matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is alive) Equal to True)) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in SS_DetectedUnits) Greater than 0
Then - Actions
-------- Makes the SS_Detector Transparent --------
Animation - Change SS_Looper's vertex coloring to (100.00%, 100.00%, 100.00%) with SS_Transparency% transparency
-------- Hiding Unit in Minimap --------
Set SS_Enemies = (All enemies of (Owner of SS_Looper))
Player Group - Pick every player in SS_Enemies and do (Actions)
Loop - Actions
Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Black mask from SS_LooperLoc to a radius of 100.00
-------- clean --------
-------- Hiding Floating Text --------
Floating Text - Hide (Load (Key Ftxt) of SS_LooperKey in (Last created hashtable)If the label is not found, this function returns NULL.) for SS_Enemies
Custom script: call DestroyForce(udg_SS_Enemies)
Else - Actions
-------- Resets The Vertex coloring --------
Animation - Change SS_Looper's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
-------- Showing Unit in Minimap --------
Set SS_Enemies = (All enemies of (Owner of SS_Looper))
Player Group - Pick every player in SS_Enemies and do (Actions)
Loop - Actions
Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility from SS_LooperLoc to a radius of 100.00
-------- Showing Floating Text --------
Floating Text - Show (Load (Key Ftxt) of SS_LooperKey in (Last created hashtable)If the label is not found, this function returns NULL.) for SS_Enemies
Custom script: call DestroyForce(udg_SS_Enemies)
-------- Starts Life Detection --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_LoopCurrentLife Less than or equal to SS_LifeDetect[SS_LoopLevels]
Then - Actions
-------- Checking if there are any charges left --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_CurrentCharges Greater than 0
Then - Actions
-------- Checking --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_Looper is in SS_InviGroup) Not equal to True
Then - Actions
-------- Determines Duration --------
Set SS_CurrentDuration = 0.00
Hashtable - Save SS_CurrentDuration as 3 of SS_LooperKey in SS_Hash
-------- Adding Permanent Invisibility --------
Unit - Add SS_Abilties[2] to SS_Looper
Unit - Set level of SS_Abilties[2] for SS_Looper to SS_LoopLevels
-------- Heals 50 hp to debug --------
Unit - Set life of SS_Looper to (SS_LoopCurrentLife + 50.00)
-------- Starts the loop --------
Unit Group - Add SS_Looper to SS_InviGroup
-------- Removing a charge --------
Hashtable - Save (SS_CurrentCharges - 1) as 0 of SS_LooperKey in SS_Hash
Else - Actions
-------- Saving Variables --------
Hashtable - Save (SS_CurrentDuration - SS_Duration) as 3 of SS_LooperKey in SS_Hash
Hashtable - Save (SS_CurrentCharges - 1) as 0 of SS_LooperKey in SS_Hash
Else - Actions
Else - Actions
-------- Creates Floating Text --------
Floating Text - Destroy (Load (Key FTXT) of SS_LooperKey in SS_HashIf the label is not found, this function returns NULL.)
Floating Text - Create floating text that reads SS_ChargeText[SS_CurrentCharges] above SS_Looper with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Hashtable - Save Handle Of(Last created floating text) as (Key FTXT) of SS_LooperKey in SS_Hash
-------- Cleaning Leaks --------
Custom script: call DestroyGroup(udg_SS_DetectedUnits)
Custom script: call RemoveLocation(udg_SS_LooperLoc)
-------- Adding Charge --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Timer Greater than or equal to SS_MaxTimer
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_CurrentCharges Less than SS_MaxCharges
Then - Actions
Hashtable - Save (SS_CurrentCharges + 1) as 0 of SS_LooperKey in SS_Hash
Else - Actions
-------- Reset Timer --------
Hashtable - Save (SS_Timer x 0.00) as 2 of SS_LooperKey in SS_Hash
Else - Actions
-------- Saving Timer --------
Hashtable - Save (SS_Timer + 0.04) as 2 of SS_LooperKey in SS_Hash
Else - Actions
-------- Destroys Floating Text --------
Floating Text - Destroy (Load (Key FTXT) of SS_LooperKey in SS_HashIf the label is not found, this function returns NULL.)
-------- Turns Charges to 0 --------
Hashtable - Save (SS_CurrentCharges x 0) as 0 of SS_LooperKey in SS_Hash
-------- Starts Invi Loop --------
Unit Group - Pick every unit in SS_InviGroup and do (Actions)
Loop - Actions
Set SS_InviUnit = (Picked unit)
Custom script: set udg_SS_InviKey = GetHandleId(udg_SS_InviUnit)
-------- Load --------
Set SS_CurrentDuration = (Load 3 of SS_InviKey from SS_Hash)
Set SS_CustomTimer = (Load 6 of SS_InviKey from SS_Hash)
-------- Check --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_CurrentDuration Less than SS_Duration
(SS_InviUnit is alive) Equal to True
Then - Actions
Set SS_InviLevels = (Level of SS_Abilties[1] for SS_InviUnit)
-------- Turns collision --------
Unit - Turn collision for SS_InviUnit Off
Set SS_TempLoc = (Position of SS_InviUnit)
-------- Creating Shadows --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_CustomTimer Greater than or equal to 0.12
Then - Actions
Set SS_Offset = (SS_TempLoc offset by -50.00 towards (Facing of SS_InviUnit) degrees)
Unit - Create 1 SS_Unit for (Owner of SS_InviUnit) at SS_Offset facing (Facing of SS_InviUnit) degrees
Set SS_Shadow = (Last created unit)
Animation - Play SS_Shadow's walk animation
Animation - Change SS_Shadow's animation speed to 50.00% of its original speed
-------- Adding Fade --------
Unit Group - Add SS_Shadow to SS_FadeGroup
-------- Saving --------
Hashtable - Save (SS_CustomTimer x 0.00) as 6 of SS_InviKey in SS_Hash
-------- Clean --------
Custom script: call RemoveLocation(udg_SS_TempLoc)
Custom script: call RemoveLocation(udg_SS_Offset)
Else - Actions
Hashtable - Save (SS_CustomTimer + 0.04) as 6 of SS_InviKey in SS_Hash
-------- Regeneration --------
-------- Life --------
Set SS_MaxLife = (Max life of SS_InviUnit)
Set SS_CurrentLife = (Life of SS_InviUnit)
Set SS_LifeRegenLoop = ((SS_MaxLife x SS_LifeRegen[SS_InviLevels]) x 0.04)
Unit - Set life of SS_InviUnit to (SS_CurrentLife + SS_LifeRegenLoop)
-------- Mana --------
Set SS_MaxMana = (Max mana of SS_InviUnit)
Set SS_CurrentMana = (Mana of SS_InviUnit)
Set SS_ManaRegenLoop = ((SS_MaxMana x SS_ManaRegen[SS_InviLevels]) x 0.04)
Unit - Set mana of SS_InviUnit to (SS_CurrentMana + SS_ManaRegenLoop)
-------- Saving --------
Hashtable - Save (SS_CurrentDuration + 0.04) as 3 of SS_InviKey in SS_Hash
Else - Actions
-------- Removing ability --------
Unit - Remove SS_Abilties[2] from SS_InviUnit
Unit - Turn collision for SS_InviUnit On
-------- Removing Unit --------
Hashtable - Save (SS_CurrentDuration x 0.00) as 3 of SS_InviKey in SS_Hash
Unit Group - Remove SS_InviUnit from SS_InviGroup
Unit Group - Pick every unit in SS_FadeGroup and do (Actions)
Loop - Actions
Set SS_Shadows = (Picked unit)
Custom script: set udg_SS_ShadowKey = GetHandleId(udg_SS_Shadows)
-------- Load --------
Set SS_Fade = (Load (Key fade) of SS_ShadowKey from SS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Fade Less than 100.00
Then - Actions
-------- Changing Transparency --------
Animation - Change SS_Shadows's vertex coloring to (0.00%, 0.00%, 0.00%) with SS_Fade% transparency
-------- Saving --------
Hashtable - Save (SS_Fade + 4.00) as (Key fade) of SS_ShadowKey in SS_Hash
Else - Actions
-------- Removing Unit --------
Unit Group - Remove SS_Shadows from SS_FadeGroup
Unit - Remove SS_Shadows from the game
Hashtable - Clear all child hashtables of child SS_ShadowKey in SS_Hash
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SS_LoopGroup is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
[/trigger][trigger=Attack]SS Attack
Events
Unit - A unit Is attacked
Conditions
(Level of SS_Abilties[2] for (Attacking unit)) Greater than 0
Actions
-------- Variables --------
Set SS_Attacker = (Attacking unit)
Set SS_Attacked = (Attacked unit)
Set SS_AttackLevels = (Level of SS_Abilties[2] for SS_Attacker)
Set SS_Damage = ((Integer(SS_AgiX[SS_AttackLevels])) x (Agility of SS_Attacker (Include bonuses)))
-------- Damage --------
Unit - Cause SS_Attacker to damage SS_Attacked, dealing (Real(SS_Damage)) damage of attack type Spells and damage type Normal
-------- SFX --------
Special Effect - Create a special effect attached to the overhead of SS_Attacked using SS_SFX_2
Special Effect - Destroy (Last created special effect)
-------- Floating Text --------
Floating Text - Create floating text that reads (+ + ((String(SS_Damage)) + !)) above SS_Attacked with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
[/trigger]
Changelogs
Version 1
-Spell Submitted.
Version 2
-Added Variables
-Added Configurations:
-Add Charge per loop
-Added increasing MP and HP regeneration per level.
-Added Level Variables
-Fixed an action that uses different key.
-Fixed bug causing floating text undestroyed after the learner dies.
-Fixed bug that causes learner to use all charge even its life is detected once.
-Fixed Tooltip.
-Increased Transparency from 80 to 100.
Version 3
-Added Fading of Shadows(Mag's Tip)
-Added walking animation for shadows
-Increased shadows life from 1 to 2.5 seconds.
-Removed Init Action that causes bugs.
Version 4
-Removed If/Then/Else Turn on in SS Learn
-Now Acquires Target
-Added Shadow Circle for the Shadows
-Added Configuration for how long does shadows last
-Added new Boolean Condition at InviLoop
-Changed a variable saved to a wrong hashtable
Version 5
-Now creates shadows every 0.20 seconds.(Mag's Tip)
-Deleted SS Evasion(due to the rules)
-Hides the looper if there are nearby enemy heroes within the reach of their sight.
-Also hides in minimap
-Now hides the floating text if there are any nearby enemy heroes.
-Added a computer player to know if it works.
-Bug with Transparency remains unfixed
-Changed Tooltip due to a lot of changes
Version 6
-Deleted SS Fade
-Removed Useless ability(crow form)
-Deleted SS Dummy Clean Up
-Added new Group
-Decreased Dummy Interval from 0.20 to 0.12
-Removed Dummy Life
-Added Fade System for Dummies
-Reworked all objects in variables
-Added new variables
Credits
Model:

FrostArmorTarget : JetFangInferno

Icons:

BTNEyes : Big Dub

Tips:

Magtheridon96

Unit Fade:

popo8000
-
Comment if you find any bugs or suggestions
Download Files:
 
Last edited:
Level 16
Joined
Apr 4, 2011
Messages
995
Hmmm I don't see anything in the rules about a WiP, but just to satisfy the masses I'll drop my spell early

I will say this, there is a bug I haven't found out how to fix yet, and I need to add special effects, but otherwise it is all working.

Mesmerising Show!

Creates an entertainer at target location. The entertainer puts on a bad show and causes all nearby enemy units to attack him. During this time, the caster gains the subability "Assassinate". It deals damage. If the caster is behind the target (give or take a few degrees), it will have a critical multiplier.

Yes this is theme relevant. John Wilkes Booth was a real assassin!

  • HashtableVariables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set As_Hash = (Last created hashtable)
      • -------- sets the level 1 damage for assassinate --------
      • Set damagebase = 20.00
      • -------- Adds this amount to each level (1, 2, & 3) --------
      • Set damageupgrade = 80.00
      • -------- Sets the base duration for the spell --------
      • Set durationbase = 5.00
      • -------- Sets the scaling values for the duration. Personally I didn't want any. --------
      • Set durationupgrade = 0.00
      • -------- Sets the critical damage multiplier for level 1 --------
      • Set critmultbase = 0.75
      • -------- Sets the critical damage multiplier scaling damage. --------
      • Set critmultupgrade = 0.75
      • -------- If TRUE, shows a red critical tag for criticals --------
      • Set crittag = True
      • -------- -------------------- --------
      • -------- If you wish to change the HP gained by the entertainer per level, edit the ability inside the Object Editor --------
      • -------- -------------------- --------
  • Show
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mesmerising Show!
    • Actions
      • -------- Variables and variables and variables and variables! --------
      • -------- So don't touch it --------
      • Set caster = (Triggering unit)
      • Set l = (Real((Level of Mesmerising Show! for caster)))
      • Set damage = (damagebase + (damageupgrade x l))
      • Set duration = (durationbase + (durationupgrade x l))
      • Set crit = (critmultbase + (critmultupgrade x l))
      • Set point1 = (Target point of ability being cast)
      • -------- Spawning the entertainer then adding the life bonus for his level. --------
      • Unit - Create 1 Entertainer (Male 2) for (Owner of caster) at point1 facing Default building facing degrees
      • Set entertainer = (Last created unit)
      • Unit - Add Health Bonus to entertainer
      • Unit - Set level of Health Bonus for entertainer to (Integer(l))
      • -------- Saving hashs for the caster here because it is easier for me to visualize when it's here instead of at the bottom. Plus I use the handle later again. --------
      • Custom script: set udg_handle = GetHandleId(udg_caster)
      • Hashtable - Save damage as 1 of handle in As_Hash
      • Hashtable - Save duration as 2 of handle in As_Hash
      • Hashtable - Save crit as 3 of handle in As_Hash
      • Hashtable - Save Handle Ofentertainer as 4 of handle in As_Hash
      • Unit Group - Add caster to castergroup
      • -------- Removing the spell and adding the subability assassinate --------
      • -------- We don't need levels for assassinate since the damage is already saved for it. --------
      • Unit - Remove Mesmerising Show! from caster
      • Unit - Add Assassinate to caster
      • Set showgroup = (Load 5 of handle in As_Hash)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of point1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of caster)) Equal to False)))) and do (Actions)
        • Loop - Actions
          • Set target = (Picked unit)
          • Unit Group - Add target to showgroup
      • Hashtable - Save Handle Ofshowgroup as 5 of handle in As_Hash
      • Custom script: call RemoveLocation(udg_point1)
      • Trigger - Turn on Show Loop <gen>
      • Trigger - Turn on Assassinate <gen>
  • Show Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in castergroup and do (Actions)
        • Loop - Actions
          • Set caster = (Picked unit)
          • Custom script: set udg_handle = GetHandleId(udg_caster)
          • Set duration = (Load 2 of handle from As_Hash)
          • Set entertainer = (Load 4 of handle in As_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((entertainer is alive) Equal to False) or (duration Less than or equal to 0.00)
            • Then - Actions
              • Hashtable - Clear all child hashtables of child handle in As_Hash
              • Unit - Kill entertainer
              • Unit - Remove Assassinate from caster
              • Unit - Add Mesmerising Show! to caster
              • Unit Group - Remove caster from castergroup
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in castergroup) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Trigger - Turn off Assassinate <gen>
                • Else - Actions
            • Else - Actions
              • Hashtable - Save (duration - 0.10) as 2 of handle in As_Hash
              • Set showgroup = (Load 5 of handle in As_Hash)
              • Unit Group - Pick every unit in showgroup and do (Actions)
                • Loop - Actions
                  • Unit - Order (Picked unit) to Attack entertainer
  • Assassinate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Assassinate
    • Actions
      • -------- Getting variables dawg --------
      • Set caster = (Triggering unit)
      • Custom script: set udg_handle = GetHandleId(udg_caster)
      • Set target = (Target unit of ability being cast)
      • Set damage = (Load 1 of handle from As_Hash)
      • -------- Angles --------
      • Set angle = (Facing of caster)
      • Set angle2 = (Facing of target)
      • -------- Check if the caster is behind the target, within 40 degrees --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Abs((angle - angle2))) Less than or equal to 10.00
        • Then - Actions
          • Set crit = (Load 3 of handle from As_Hash)
          • Unit - Cause caster to damage target, dealing (crit x damage) damage of attack type Pierce and damage type Normal
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • crittag Equal to True
            • Then - Actions
              • Set point1 = (Position of target)
              • Floating Text - Create floating text that reads (String((crit x damage))) at point1 with Z offset 0.00, using font size 18.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Show (Last created floating text) for (All players)
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
              • Custom script: call RemoveLocation(udg_point1)
            • Else - Actions
        • Else - Actions
          • Unit - Cause caster to damage target, dealing damage damage of attack type Pierce and damage type Normal
I know the bug is somewhere in the first cast trigger. The units refuse to attack the entertainer, even though they're ordered to :( Rest of everything works though, and no game crashing bugs. Once I iron this one thing out I'll add sfx and some anims and call it good.

If you see a leak lemme know.
 

Attachments

  • THW Zephyr Contest #9.w3x
    40.5 KB · Views: 35
@Radamantus:

Okay, I'm going to give you a few tips:

- "A unit is attacked" != "A unit is damaged"
Try targetting a unit for an attack, and stopping really fast after. If you try hard enough, you can actually deal damage and remain invisible.
You should use a damage detection system like Bribe's DamageEngine to fix this.

- Your "Dummy Cleanup" trigger is not multi-instanceable.

edit
I take that back. I just noticed that SS_Unit is a unit-type and not a unit ;p

Also, use (Triggering unit) whenever possible because it's slightly faster than all the other counterparts (GetAttackedUnit(), GetLearningUnit(), etc...)
 
Level 16
Joined
Apr 4, 2011
Messages
995
You had better enumerate nearby units within the loop and avoid keeping the pre-defined group only. Also, use some woman (who dances) maybe to actually depict the mesmerizing part ;)

How do you mean? Why would numbering them help?

Currently my problem is that it just doesn't select the group in order to attack the entertainer.

I'll take a look at some other models and find the most appropriate one.
 
Status
Not open for further replies.
Top