Shadowstep

LuckyStrike

New Member
Reaction score
1
Hy, i got a problem with my spell...

The spell : Shadowstep - works the same as blink but only on units

I want to add a slow effect to my spell.

Here's how far i got:
JASS:
function Trig_Shadowstep_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A008' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Shadowstep_Func009C takes nothing returns boolean
    if ( not ( IsUnitEnemy(udg_Shadow_Units[2], GetOwningPlayer(udg_Shadow_Units[1])) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Shadowstep_Actions takes nothing returns nothing
    set udg_Shadow_Units[1] = GetTriggerUnit()
    set udg_Shadow_Units[2] = GetSpellTargetUnit()
    set udg_Shadow_Point = GetUnitLoc(udg_Shadow_Units[2])
    call AddSpecialEffectTargetUnitBJ( "feet", udg_Shadow_Units[1], "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
    set udg_Shadow_effects[1] = GetLastCreatedEffectBJ()
    call TriggerSleepAction( 0.03 )
    call AddSpecialEffectTargetUnitBJ( "feet", udg_Shadow_Units[1], "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl" )
    set udg_Shadow_effects[2] = GetLastCreatedEffectBJ()
    if ( Trig_Shadowstep_Func009C() ) then
        call SetUnitPositionLoc( udg_Shadow_Units[1], udg_Shadow_Point )
        call IssueTargetOrder( udg_Shadow_Units[1], "attack", udg_Shadow_Units[2] )
    else
    endif
endfunction

//===========================================================================
function InitTrig_Shadowstep takes nothing returns nothing
    set gg_trg_Shadowstep = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadowstep, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Shadowstep, Condition( function Trig_Shadowstep_Conditions ) )
    call TriggerAddAction( gg_trg_Shadowstep, function Trig_Shadowstep_Actions )
endfunction
(converted from MUI to JASS)
 

Nexor

...
Reaction score
74
It's GUI, not MUI
GUI stands for Graphical User Interface : a user-friendly interface for JASS
MUI stands for Multi-Unit Instable : it means that the skill can be used by an unlimited number of units, and wont crash
 

Exide

I am amazingly focused right now!
Reaction score
448
Why did you convert it, when you haven't optimized it?
What is it that you want to happen, and what happens? (What's the problem?)

>I want to add a slow effect to my spell.
You want the target unit to be slowed?
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
> Instable
Instanceable.

JASS:
function Trig_Shadowstep_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A008'
endfunction

function Trig_Shadowstep_Actions takes nothing returns nothing
    local unit caster = GetTriggerUnit()
    local unit target = GetSpellTargetUnit()
    local real ms = GetUnitMoveSpeed(target)
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl", GetUnitX(caster), GetUnitY(caster)))
    call TriggerSleepAction( 0.03 )
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl", GetUnitX(caster), GetUnitY(caster)))
    if IsUnitEnemy(caster, target) then
        call SetUnitPosition(caster, GetUnitX(target), GetUnitY(target))
        call IssueTargetOrder(caster, "attack", target)
        call SetUnitMoveSpeed(target, ms/1.5)
        call TriggerSleepAction(3)
        call SetUnitMoveSpeed(target, ms)
    else
    endif
    set caster = null
    set target = null
endfunction

//===========================================================================
function InitTrig_Shadowstep takes nothing returns nothing
    set gg_trg_Shadowstep = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadowstep, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Shadowstep, Condition( function Trig_Shadowstep_Conditions ) )
    call TriggerAddAction( gg_trg_Shadowstep, function Trig_Shadowstep_Actions )
endfunction


I believe this should work, I didn't fully understand if you wanted a slowing in an area though.
 

LuckyStrike

New Member
Reaction score
1
Srry i didnt specified, i want it to work like this : the spell is cast by my hero on an unit, he is teleported next to the unit and adds a slow effect for a couple of seconds to the targeted unit.
Also srry for my bad english, because i'm romanian :rolleyes:
 

Exide

I am amazingly focused right now!
Reaction score
448
Simply create a dummy unit and have it cast a 'slow ability' on the target.
 

LuckyStrike

New Member
Reaction score
1
> Instable
Instanceable.

JASS:
function Trig_Shadowstep_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A008'
endfunction

function Trig_Shadowstep_Actions takes nothing returns nothing
    local unit caster = GetTriggerUnit()
    local unit target = GetSpellTargetUnit()
    local real ms = GetUnitMoveSpeed(target)
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl", GetUnitX(caster), GetUnitY(caster)))
    call TriggerSleepAction( 0.03 )
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl", GetUnitX(caster), GetUnitY(caster)))
    if IsUnitEnemy(caster, target) then
        call SetUnitPosition(caster, GetUnitX(target), GetUnitY(target))
        call IssueTargetOrder(caster, "attack", target)
        call SetUnitMoveSpeed(target, ms/1.5)
        call TriggerSleepAction(3)
        call SetUnitMoveSpeed(target, ms)
    else
    endif
    set caster = null
    set target = null
endfunction

//===========================================================================
function InitTrig_Shadowstep takes nothing returns nothing
    set gg_trg_Shadowstep = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadowstep, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Shadowstep, Condition( function Trig_Shadowstep_Conditions ) )
    call TriggerAddAction( gg_trg_Shadowstep, function Trig_Shadowstep_Actions )
endfunction


I believe this should work, I didn't fully understand if you wanted a slowing in an area though.

No this doesn't work. I wanted this spell to function like combining blinkstrike with slow if u understand what i mean.
Simply create a dummy unit and have it cast a 'slow ability' on the target.
Can i do that in GUI? ( i understant GUI better than JASS)
 

Exide

I am amazingly focused right now!
Reaction score
448

LuckyStrike

New Member
Reaction score
1
Still not slowing...

I made the trigger like this :
Trigger:
  • Shadowstep
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadowstep
    • Actions
      • Set Shadow_Units[1] = (Triggering unit)
      • Set Shadow_Units[2] = (Target unit of ability being cast)
      • Set Shadow_Point = (Position of Shadow_Units[2])
      • Special Effect - Create a special effect attached to the chest of Shadow_Units[1] using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
      • Set Shadow_effects[1] = (Last created special effect)
      • Wait 0.03 seconds
      • Special Effect - Create a special effect attached to the chest of Shadow_Units[1] using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
      • Set Shadow_effects[2] = (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Shadow_Units[2] belongs to an enemy of (Owner of Shadow_Units[1])) Equal to True
        • Then - Actions
          • Set Point = (Position of (Triggering unit))
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point facing Default building facing degrees
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Slow to (Last created unit)
          • Unit - Set level of Slow for (Last created unit) to (Level of Shadowstep for (Triggering unit))
          • Unit - Order (Last created unit) to Human Sorceress - Slow (Target unit of ability being cast)
          • Unit - Move Shadow_Units[1] instantly to Shadow_Point
          • Unit - Order Shadow_Units[1] to Attack Shadow_Units[2]
          • Custom script: call RemoveLocation (udg_Point)
        • Else - Actions



It teleports, but doesn't slows the target...where did I go wrong?
 

Meowier

New Member
Reaction score
6
Target unit of ability being cast cannot work after 'wait' is put into a trigger.

Unit - Order (Last created unit) to Human Sorceress - Slow (Target unit of ability being cast)

You want to change that to

Unit - Order (Last created unit) to Human Sorceress - Slow (Shadow_Units[2])

It should work after that.
 

Exide

I am amazingly focused right now!
Reaction score
448
Also make sure that your slow ability has a long range (so that the dummy isn't out of range), and that it costs no mana (so that the dummy can actually cast it.)
To search for errors with the ability try pre-placing a dummy unit with the slow ability and order it around manually.
Don't forget the 'targets allowed' either. In case you're trying to cast slow on a mechanical unit or something.
Finally I suggest you move 'Point' to (Position of (Target unit of ability being cast)) - that way it'll be closer to the target.
 

LuckyStrike

New Member
Reaction score
1
I just don't get it...

Trigger:
  • Shadowstep
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadowstep
    • Actions
      • Set Shadow_Units[1] = (Triggering unit)
      • Set Shadow_Units[2] = (Target unit of ability being cast)
      • Set Shadow_Point = (Position of Shadow_Units[2])
      • Special Effect - Create a special effect attached to the chest of Shadow_Units[1] using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
      • Set Shadow_effects[1] = (Last created special effect)
      • Wait 0.03 seconds
      • Special Effect - Create a special effect attached to the chest of Shadow_Units[1] using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
      • Set Shadow_effects[2] = (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Shadow_Units[2] belongs to an enemy of (Owner of Shadow_Units[1])) Equal to True
        • Then - Actions
          • Set Point = (Position of (Target unit of ability being cast))
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point facing Default building facing degrees
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Slow to (Last created unit)
          • Unit - Set level of Slow for (Last created unit) to (Level of Shadowstep for (Triggering unit))
          • Unit - Order (Last created unit) to Human Sorceress - Slow Shadow_Units[2]
          • Unit - Move Shadow_Units[1] instantly to Shadow_Point
          • Unit - Order Shadow_Units[1] to Attack Shadow_Units[2]
          • Custom script: call RemoveLocation (udg_Point)
        • Else - Actions

I did every step you guys sugested... modified slow's range, manacost, target(air, ground,enemy), and still doesn't slow...
 

Exide

I am amazingly focused right now!
Reaction score
448
The 'Targets allowed' is a bitch.
-Did you try to give it to a unit and order it to slow other units manually? (You usually get messages like 'You can't cast that on that unit', 'Must target a tree', and so on. -Which will help you figure out what you need to allow in 'Targets allowed'.)

Here's what I have:
'Air, Allied, Enemy, Friend, Ground, Mechanical, Neutral, Non-suicidal, Organic'
 

LuckyStrike

New Member
Reaction score
1
I added slow to a unit and manualy it works, but the slow in shadowstep doesn't work. Im starting to belive that its the trigger.
 

Exide

I am amazingly focused right now!
Reaction score
448
Wanna upload your map?

Maybe your ability doesn't have enough levels?
Code:
Unit - Set level of Slow for (Last created unit) to (Level of Shadowstep for (Triggering unit))
 

Exide

I am amazingly focused right now!
Reaction score
448
Your action:

Code:
Unit - Create 1 [COLOR="Red"]Dummy[/COLOR] for (Owner of (Triggering unit)) at Point facing Default building facing degrees
Is wrong.

'Dummy' is a variable, not a unit -type.
This would be fine, if you had remembered to 'set Dummy = ...', but you seem to have forgotten this.

Either create a trigger like this:
Code:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        Set Dummy = [B]*Your_Dummy_Unit*[/B]

or change the action in your trigger:
Code:
Unit - Create 1 [COLOR="Red"]Dummy[/COLOR] for (Owner of (Triggering unit)) at Point facing Default building facing degrees

to:
Code:
Unit - Create 1 [B]*Your_Dummy_Unit*[/B] for (Owner of (Triggering unit)) at Point facing Default building facing degrees
 

LuckyStrike

New Member
Reaction score
1
It worked !!! But...(there's a but :()now the dummy apears after the spell is cast... and dies after few seconds. Can I make the dummy not visible ?


L.E.: Solved problem!:thup:. Thank you all for the help, and thanks for being patient with me :D.
 
General chit-chat
Help Users
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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