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

Soul Split

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Triggers:


[trigger="Soul Split Cast"]

Soul Split Cast
Events
Unit - A unit Begins channeling an ability
Conditions
(Ability being cast) Equal to Soul Split
Actions
-------- ---------------------------------------------- --------
-------- Sets some CustomValue for MUI --------
-------- ---------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VP_CustomValue Less than or equal to 1000
Then - Actions
Set VP_CustomValue = (VP_CustomValue + 1)
Else - Actions
Set VP_CustomValue = 1
-------- ---------------------------------------------- --------
-------- Sets the Variable for the (Caster) --------
-------- ---------------------------------------------- --------
Set VP_Caster[VP_CustomValue] = (Triggering unit)
-------- ---------------------------------------------- --------
-------- Sets the distance for creating the Puppet --------
-------- ---------------------------------------------- --------
Set VP_TempPoint = (Position of VP_Caster[VP_CustomValue])
Set VP_CastRange = (VP_TempPoint offset by 0.00 towards (Facing of VP_Caster[VP_CustomValue]) degrees)
-------- ---------------------------------------------- --------
-------- Turns off the collision of the CASTER so when the puppet is created it will not separate --------
-------- ---------------------------------------------- --------
Unit - Turn collision for VP_Caster[VP_CustomValue] Off
-------- ---------------------------------------------- --------
-------- Creates the Puppet / Collision is OFF / Moving the puppet into the CASTER --------
-------- ---------------------------------------------- --------
Unit - Create 1 Soul (Puppet) for (Owner of VP_Caster[VP_CustomValue]) at VP_CastRange facing (Facing of VP_Caster[VP_CustomValue]) degrees
Set VP_Puppet[VP_CustomValue] = (Last created unit)
Unit - Turn collision for VP_Puppet[VP_CustomValue] Off
Unit - Move VP_Puppet[VP_CustomValue] instantly to VP_TempPoint, facing (Facing of VP_Caster[VP_CustomValue]) degrees
Custom script: call RemoveLocation(udg_TempPoint)
-------- ---------------------------------------------- --------
-------- Orders the puppet to move forward --------
-------- ---------------------------------------------- --------
Set VP_TempPoint = (Position of VP_Puppet[VP_CustomValue])
Unit - Order VP_Puppet[VP_CustomValue] to Move To (VP_TempPoint offset by 200.00 towards (Facing of VP_Caster[VP_CustomValue]) degrees)
Custom script: call RemoveLocation(udg_VP_TempPoint)
-------- ---------------------------------------------- --------
-------- Changes the transparecy to each unit, to create some ghostly effects --------
-------- ---------------------------------------------- --------
Set VP_Ghost[VP_CustomValue] = 0.00
-------- ---------------------------------------------- --------
-------- Adds a timer for (Channeling) / Lasts --------
-------- ---------------------------------------------- --------
Set VP_TimeCurrent[VP_CustomValue] = 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Soul Split for VP_Caster[VP_CustomValue]) Less than or equal to 3
Then - Actions
Set VP_TimeMax[VP_CustomValue] = (5.00 + (5.00 x (Real((Level of Soul Split for VP_Caster[VP_CustomValue])))))
Unit - Add a VP_TimeMax[VP_CustomValue] second Generic expiration timer to VP_Puppet[VP_CustomValue]
Else - Actions
Set VP_TimeMax[VP_CustomValue] = 20.00
Unit - Add a VP_TimeMax[VP_CustomValue] second Generic expiration timer to VP_Puppet[VP_CustomValue]
-------- ---------------------------------------------- --------
-------- Sets the Points of each unit --------
-------- (Source and Target to the Lightning Effects) --------
-------- ---------------------------------------------- --------
Set VP_CasterPoint[VP_CustomValue] = (Position of VP_Caster[VP_CustomValue])
Set VP_PuppetPoint[VP_CustomValue] = (Position of VP_Puppet[VP_CustomValue])
-------- ---------------------------------------------- --------
-------- Creates the Lightning --------
-------- ---------------------------------------------- --------
Lightning - Create a Drain Mana lightning effect from source VP_CasterPoint[VP_CustomValue] to target VP_PuppetPoint[VP_CustomValue]
Lightning - Change color of (Last created lightning effect) to (1.00 0.00 1.00) with 1.00 alpha
Set VP_Lightning[VP_CustomValue] = (Last created lightning effect)
-------- ---------------------------------------------- --------
-------- Adds an ability for the Puppet --------
-------- ---------------------------------------------- --------
Unit - Add Soul Split Damage to VP_Puppet[VP_CustomValue]
Unit - Set level of Soul Split Damage for VP_Puppet[VP_CustomValue] to (Level of Soul Split for VP_Caster[VP_CustomValue])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Level of Soul Split for VP_Caster[VP_CustomValue]) Equal to 1
(Level of Soul Split for VP_Caster[VP_CustomValue]) Equal to 2
Then - Actions
Unit - Add Hex (Neutral Hostile) to VP_Puppet[VP_CustomValue]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Level of Soul Split for VP_Caster[VP_CustomValue]) Equal to 3
(Level of Soul Split for VP_Caster[VP_CustomValue]) Equal to 4
Then - Actions
Unit - Add Hex (Neutral Hostile) to VP_Puppet[VP_CustomValue]
Unit - Add Chain Lightning (Neutral Hostile) to VP_Puppet[VP_CustomValue]
Else - Actions
-------- ---------------------------------------------- --------
-------- Selects the Puppet for the Player to control the Puppet Instantly --------
-------- ---------------------------------------------- --------
Selection - Select VP_Puppet[VP_CustomValue] for (Owner of VP_Caster[VP_CustomValue])
-------- ---------------------------------------------- --------
-------- Adds Invulnerable and Pauses the Caster --------
-------- ---------------------------------------------- --------
Unit - Pause VP_Caster[VP_CustomValue]
Unit - Make VP_Caster[VP_CustomValue] Invulnerable
-------- ---------------------------------------------- --------
-------- Creates the Dummy to Run the Trigger [Puppet Loop] for MUI --------
-------- ---------------------------------------------- --------
Set VP_TempPoint = (Center of (Playable map area))
Unit - Create 1 Dummy for (Owner of VP_Caster[VP_CustomValue]) at VP_TempPoint facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to VP_CustomValue
Unit Group - Add (Last created unit) to VP_Group
-------- ---------------------------------------------- --------
-------- Removing Leaks --------
-------- ---------------------------------------------- --------
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call RemoveLocation(udg_VP_CastRange)
Custom script: call RemoveLocation(udg_VP_CasterPoint[udg_VP_CustomValue])
Custom script: call RemoveLocation(udg_VP_PuppetPoint[udg_VP_CustomValue])
[/trigger]



[trigger="Soul Split Channel"]

Soul Split Channel
Events
Time - Every 0.04 seconds of game time
Conditions
(Number of units in VP_Group) Greater than 0
Actions
-------- ---------------------------------------------- --------
-------- Picks every DUMMY inside that GROUP --------
-------- ---------------------------------------------- --------
Unit Group - Pick every unit in VP_Group and do (Actions)
Loop - Actions
-------- ---------------------------------------------- --------
-------- Creates a Variable for the CustomValue of the Picked DUMMY --------
-------- ---------------------------------------------- --------
Set VP_TempInteger = (Custom value of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(VP_Puppet[VP_TempInteger] is dead) Equal to True
(VP_Caster[VP_TempInteger] is dead) Equal to True
VP_TimeCurrent[VP_TempInteger] Greater than or equal to VP_TimeMax[VP_TempInteger]
Then - Actions
-------- ---------------------------------------------- --------
-------- Makes the Caster Vulnerable and Unpaused --------
-------- ---------------------------------------------- --------
Unit - Unpause VP_Caster[VP_TempInteger]
Unit - Make VP_Caster[VP_TempInteger] Vulnerable
-------- ---------------------------------------------- --------
-------- Selects back to the Caster so the Player can easily control his hero again --------
-------- ---------------------------------------------- --------
Selection - Select VP_Caster[VP_TempInteger] for (Owner of VP_Caster[VP_TempInteger])
-------- ---------------------------------------------- --------
-------- Returns to the normal color and transparancy of the CASTER --------
-------- ---------------------------------------------- --------
Animation - Change VP_Caster[VP_TempInteger]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
-------- ---------------------------------------------- --------
-------- Destroys the Lightning Effect --------
-------- ---------------------------------------------- --------
Lightning - Destroy VP_Lightning[VP_TempInteger]
-------- ---------------------------------------------- --------
-------- Adds an effect of capturing back the soul of the CASTER --------
-------- ---------------------------------------------- --------
Set VP_TempPoint = (Position of VP_Puppet[VP_TempInteger])
Special Effect - Create a special effect at VP_TempPoint using Abilities\Spells\Items\AIso\AIsoTarget.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_VP_TempPoint)
-------- ---------------------------------------------- --------
-------- Reduces the life of the Caster (Because of the soul has ended) --------
-------- ---------------------------------------------- --------
Special Effect - Create a special effect attached to the origin of VP_Caster[VP_TempInteger] using Abilities\Spells\Demon\DemonBoltImpact\DemonBoltImpact.mdl
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Percentage life of VP_Caster[VP_TempInteger]) Less than or equal to 10.00
Then - Actions
Unit - Set life of VP_Caster[VP_TempInteger] to 1.00
Else - Actions
Unit - Set life of VP_Caster[VP_TempInteger] to ((Percentage life of VP_Caster[VP_TempInteger]) - (5.00 x (Real((Level of Soul Split for VP_Caster[VP_TempInteger])))))%
-------- ---------------------------------------------- --------
-------- Removes the Puppet --------
-------- ---------------------------------------------- --------
Unit - Remove VP_Puppet[VP_TempInteger] from the game
-------- ---------------------------------------------- --------
-------- Stops the Channeling --------
-------- ---------------------------------------------- --------
Unit - Order VP_Caster[VP_TempInteger] to Stop
-------- ---------------------------------------------- --------
-------- Turns the Collision OFF --------
-------- ---------------------------------------------- --------
Unit - Turn collision for VP_Caster[VP_TempInteger] On
-------- ---------------------------------------------- --------
-------- Removes the Picked Dummy --------
-------- ---------------------------------------------- --------
Unit - Remove (Picked unit) from the game
Else - Actions
-------- ---------------------------------------------- --------
-------- Sets the Points of each unit (Source and Target Lightning) --------
-------- ---------------------------------------------- --------
Set VP_CasterPoint[VP_TempInteger] = (Position of VP_Caster[VP_TempInteger])
Set VP_PuppetPoint[VP_TempInteger] = (Position of VP_Puppet[VP_TempInteger])
-------- ---------------------------------------------- --------
-------- Moves the Lightning Effect to the source (Caster) and target (Puppet) --------
-------- ---------------------------------------------- --------
Lightning - Move VP_Lightning[VP_TempInteger] to source VP_CasterPoint[VP_TempInteger] and target VP_PuppetPoint[VP_TempInteger]
-------- ---------------------------------------------- --------
-------- Makes the caster to face the Puppet, so that it looks like he controls the Puppet --------
-------- ---------------------------------------------- --------
Unit - Make VP_Caster[VP_TempInteger] face VP_Puppet[VP_TempInteger] over 0.00 seconds
-------- ---------------------------------------------- --------
-------- Fills up the timer, When it reaches to the Maxtime the Channeling will end --------
-------- ---------------------------------------------- --------
Set VP_TimeCurrent[VP_TempInteger] = (VP_TimeCurrent[VP_TempInteger] + 0.04)
-------- ---------------------------------------------- --------
-------- Turning the color and transparancy of the CASTER to create some ghostly effects --------
-------- ---------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VP_Ghost[VP_TempInteger] Greater than or equal to 50.00
Then - Actions
Else - Actions
Set VP_Ghost[VP_TempInteger] = (VP_Ghost[VP_TempInteger] + 2.00)
Animation - Change VP_Caster[VP_TempInteger]'s vertex coloring to (100.00%, 100.00%, 100.00%) with VP_Ghost[VP_TempInteger]% transparency
Animation - Change VP_Puppet[VP_TempInteger]'s vertex coloring to (100.00%, 100.00%, 100.00%) with VP_Ghost[VP_TempInteger]% transparency
-------- ---------------------------------------------- --------
-------- Removing the Leaks --------
-------- ---------------------------------------------- --------
Custom script: call RemoveLocation(udg_VP_CasterPoint[udg_VP_TempInteger])
Custom script: call RemoveLocation(udg_VP_PuppetPoint[udg_VP_TempInteger])
[/trigger]


Remember to give credits when using it to you map. :)

Keywords:
soul, dark, soul split, split, notarget
Contents

Simple Spell - Soul Split (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 22:57, 7th Aug 2012 Magtheridon96: Instead of using custom values, you should use some other form of data storage. Try dynamic indexing, unit indexing, or maybe simple hashtables. edit...

Moderator

M

Moderator

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

22:57, 7th Aug 2012
Magtheridon96: Instead of using custom values, you should use some other form of data storage.
Try dynamic indexing, unit indexing, or maybe simple hashtables.

edit
Nevermind, I noticed you're doing it for dummies only, that's totally fine, but I'd recommend using Bribe's UnitIndexer as an optional requirement so you can disable the system, create the unit, then enable it.

Just tell the user to do so, don't actually include the system :p

Also, your method of indexing is not good enough.
Dynamic indexing would be best. Hanky outlines the method with examples perfectly, so check out that template.
 
Like with your other one, it's using custom values, which collide with eachother, put both of your spells that you've uploaded into the same map, try using them both. The result will be equal to a mess

Also I thought I should point out while your screenshots are ingame, they're not really what they mean by ingame screenshot, since neither of them actually display the -spell- they just display a hero which casts them, which actually tells us all nothing about it, can't see what it does, and yes they both lack tooltips as zv27 rightfully said

Edit: Must say though, minus all the comment scripts, this spell is actually really simple and short
 
Top