Spell Possession

ArmedCitizen

Kisses Cats
Reaction score
198
Possession

A demonic force possesses a unit, throwing it violently in the air which damages it and causes internal bleeding.

Level 1
- 100 damage, 3 damage a second after.
Level 2 - 200 damage, 6 damage a second after.
Level 3 - 300 damage, 9 damage a second after.

Screenshot.jpg

EDIT: Edited the damage done to make an easier formula. :p
 

Attachments

  • Possession.w3x
    32.3 KB · Views: 276

Sim

Forum Administrator
Staff member
Reaction score
534
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Level of Possession  for (Triggering unit)) Equal to 1
    Then - Actions
        Unit - Cause (Triggering unit) to damage TargetUnit, dealing 100.00 damage of attack type Chaos and damage type Normal
    Else - Actions

You need to use formulas for levels, not if/then/else statements for every level.

Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Level of Possession  for (Triggering unit)) Equal to 1
    Then - Actions
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Special Effect - Destroy (Last created special effect)
                Unit - Cause (Triggering unit) to damage TargetUnit, dealing 3.00 damage of attack type Chaos and damage type Normal
                Wait 1.00 game-time seconds
                Special Effect - Create a special effect at UnitPostion using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
                Set SpecialEffect = (Last created special effect)
                Wait 0.10 game-time seconds
                Special Effect - Destroy SpecialEffect
    Else - Actions

Same applies here, except that you have yet another problem: The unit's position may change since the caster regained control over it, and so the special effect will be summoned where the unit is not standing.

---------------------------

Don't set the unit's height right away. Make it go upper and upper every x seconds so it looks smoother.

You need to remove the point "UnitPosition".

At the moment the effect doesn't look like something which affects the internal parts of someone. Maybe add an implosion effect too? Browse through the effects, maybe you could find something nice!
 

ArmedCitizen

Kisses Cats
Reaction score
198
Updated: Changed the damage into formulas, removed leak, made the flying part smoother (I think. I did what Dextreme said but it looks the same to me.), changed the Internal Bleeding Effect.
 

ArmedCitizen

Kisses Cats
Reaction score
198
A demonic force possesses the unit (taking control over it) and throws it violently in the air.

I should have worded it a little differently but Possession does fit with the spell.

EDIT: Fixed the wording in the map and in first post.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> made the flying part smoother

Code:
For each (Integer A) from 1 to 8, do (Actions)
    Loop - Actions
        Animation - Change TargetUnit flying height to ((Current flying height of TargetUnit) + 50.00) at 0.00

This changes absolutely nothing you need to use either a periodic event or a 0.27 seconds wait inside your loop.
 

ArmedCitizen

Kisses Cats
Reaction score
198
I did at first but look what happens to it when you add that.

EDIT: Wouldn't it be better if it wasn't perfectly smooth anyways since this is supposed to be a violent movement. Sudden jolts seem more violent to me then smoothly going up at a quicken speed.
 

Attachments

  • PossessionTest.w3x
    32 KB · Views: 244

Sim

Forum Administrator
Staff member
Reaction score
534
Yea it doesn't work with waits.

There's a difference between "Sudden Jolts" and "instant teleportation". What happens in your spell right now is teleportation. We need to see the unit going up, not being teleported up.

Use a 0.01 periodic event?
 

Sim

Forum Administrator
Staff member
Reaction score
534
Works well now.

Code:
For each (Integer A) from 1 to 5, do (Actions)
    Loop - Actions
        Special Effect - Destroy (Last created special effect)
        Unit - Cause (Triggering unit) to damage TargetUnit, dealing (3.00 x (Real((Level of Possession  for (Triggering unit))))) damage of attack type Chaos and damage type Normal
        Wait 1.00 game-time seconds
        Set UnitPostion = (Position of TargetUnit)
        Special Effect - Create a special effect at UnitPostion using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
        Set SpecialEffect = (Last created special effect)
        Wait 0.10 game-time seconds
        Special Effect - Destroy SpecialEffect

You need to remove UnitPosition before you set it to a new value, inside the loop.

You should also add a buff to the unit which bleeds after.

And the bleeding effect is messy :p Don't use that blood explosion, use a simple bleeding effect.
 

ArmedCitizen

Kisses Cats
Reaction score
198
Ah I finally think it is finished then you have to look at it. :rolleyes:

Updated: Changed the effect, again, and added buff, which I thought I had on already but apparently didn't. Ah man if this was a whole spell pack...
 

Sim

Forum Administrator
Staff member
Reaction score
534
There is still no buff, but there is a reason.

You render the unit invulnerable, which makes the buff vanish instantly.

There is yet another problem that appears when you remove the invulnerability part. Your spell stuns 5 seconds, which prevents the unit from moving after the spell has taken effect and the bleeding starts.

Either make it stun 2 seconds or 0.
 

ArmedCitizen

Kisses Cats
Reaction score
198
How am I to add the buff then? I tried making a dummy ability off of impale and gave it the Internal Bleeding buff. It didn't work. Did I put in the wrong part of the trigger, or is it a bad spell to base it off of. (I might have even messed up with the dummy unit or something but I will recheck that alone.

Here is the trigger.

Code:
Possession
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Possession 
    Actions
        Set TargetUnit = (Target unit of ability being cast)
        Set UnitPostion = (Position of TargetUnit)
        Unit - Pause TargetUnit
        Unit - Cause (Triggering unit) to damage TargetUnit, dealing (100.00 x (Real((Level of Possession  for (Triggering unit))))) damage of attack type Chaos and damage type Normal
        Unit - Add Crow Form to TargetUnit
        Special Effect - Create a special effect at UnitPostion using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
        Set SpecialEffect = (Last created special effect)
        Trigger - Turn on Smoothness <gen>
        Unit - Make TargetUnit Invulnerable
        Special Effect - Destroy SpecialEffect
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Wait 0.01 game-time seconds
                Unit - Make TargetUnit face ((Facing of TargetUnit) + 1200.00) over 0.00 seconds
        Animation - Change TargetUnit flying height to 0.00 at 0.00
        Unit - Remove Crow Form from TargetUnit
        Unit - Make TargetUnit Vulnerable
        Unit - Unpause TargetUnit
        Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        Unit - Add Internal Bleeding  to (Last created unit)
        Unit - Order (Last created unit) to Undead Crypt Lord - Impale TargetUnit
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Special Effect - Destroy (Last created special effect)
                Unit - Cause (Triggering unit) to damage TargetUnit, dealing (3.00 x (Real((Level of Possession  for (Triggering unit))))) damage of attack type Chaos and damage type Normal
                Wait 1.00 game-time seconds
                Custom script:   call RemoveLocation( udg_UnitPostion )
                Set UnitPostion = (Position of TargetUnit)
                Special Effect - Create a special effect at UnitPostion using Objects\Spawnmodels\Human\HumanBlood\HumanBloodKnight.mdl
                Set SpecialEffect = (Last created special effect)
                Wait 0.10 game-time seconds
                Special Effect - Destroy SpecialEffect
        Custom script:   call RemoveLocation( udg_UnitPostion )
 

Tom Jones

N/A
Reaction score
437
Is there any reasons for making the targeted unit invulnerable in the first place? Have you tried casting the spell on a hero? Using 0.0 duration for any stun spell is a really bad idea.

Keep it up.
 

ArmedCitizen

Kisses Cats
Reaction score
198
Yes it does need to make the unit invulnerable. Otherwise while the spell is going the caster can attack it.

Fixed the duration already.
 

Sim

Forum Administrator
Staff member
Reaction score
534
You could then make it channeling.

Code:
For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Wait 0.01 game-time seconds
                Unit - Make TargetUnit face ((Facing of TargetUnit) + 1200.00) over 0.00 seconds

Minimum wait-time is 0.27 seconds.

Put that part inside "Smoothness" as well. We want the unit to turn on itself smoothly, heh? ;)

Inside the Smoothness trigger, also add a check to see if the unit is still channeling the spell. Otherwise, end the spell right away!
 

ArmedCitizen

Kisses Cats
Reaction score
198
Wow dude, fixed that a long time ago and quickly came to the realization of the reason why it must be a formula. :rolleyes:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top