No Idea. Spell

Crazy_Dead

New Member
Reaction score
24
In an another thread i was asking for an channeling spell idea, and sir Executor came up with this awsome idea, for my Blood Hunter Worgen.

When an enemy with under (30/33/35)% hp is in (2000/2750/3500) range the blood hunters no-target ultimate can be activated.
He takes (4/3.2/2.2) seconds channeling standing to get in a bloodlust turning his whole body slowly red and he starts to run with incredible speed (500/600/700) towards the target.
While running, colliding enemies will be hit and they start to bleed, reducing their ms and as by 15% for 4 seconds, aswell as 25 dps.
On reaching the target the blood hunter strikes it and lets it bleed, reducing his ms and as by (20/25/30)% and dealing (25/35/50) dps over 4 seconds.

The problem is: I got no idea on how to make this. No idea. Group Enum, Check Hps.

Can someone help me?
Thanks.

Greetz Crazy.
 

the Immortal

I know, I know...
Reaction score
51
Atop of my mind:

1. After a hero learns the spell, either do a periodic check for units in range of him (every 1 second or so should be enough, OR make 2 triggers (1. when unit takes damage, if he is near the hero and life below treshold, activate ulti; 2nd - unit enters in range of hero, if his life is below treshold, activate ulti)

2. How to make it activatable? Make a dummy invisible/locust/invlun unit, name it something like "a wounded enemy" and add it as a prerequisite for the spell. When the ulti can be activated (see first paragraph), create such a unit for the owner of the hero.

3. Once activated, start a low-frequency periodic timer (T32 <3), set caster animation and move him every tick towards the victim, and either enum units every few ticks, or use unit enters range event.

4. On colission apply debuffs and dps and such. Should be fairly easy compared to the rest =D


A nice complex spell. I would love doing it, actually, though I have the habit to never finish anything.
 

Bribe

vJass errors are legion
Reaction score
67
Crazy_Dead, one of your biggest problems right now is that you ask for the whole construction seemingly without trying it yourself and knocking one or two of those parts out or at least publishing your half-completed work.

You'll get more reception if you ask for a mere one thing at a time instead of bring us a list.
 

Crazy_Dead

New Member
Reaction score
24
Ask for one thing. Yup, Bribe, you're right. The problem is that i got no idea HOW to make the spell. I just cant get an idea.

Moving, bleeding, damaging, coloring. Nope, Sine, cant get it to work. :( :thdown:
 

Executor

I see you
Reaction score
57
Basically that's all relativly easy. You only have to code the spell part for part..

Start with a timer which periodically checks all enemy heroes in range.. but only if the spell has be learned.
 

Crazy_Dead

New Member
Reaction score
24
Tadah, as i suggested

But the problem, is that i get this:

JASS:
library RunningBlood initializer Init requires Damage
globals

    private constant integer SpellID = &#039;A010&#039;
    private constant real Aura = 1250.
    private constant real Channel = 1.25
    private constant real RunTime = 5.5

    public unit Caster = GetTriggerUnit( )
    public unit Targets = GetEnumUnit( )
    public group UnitGroup = CreateGroup( )
    real CasterX = GetUnitX(Caster)
    real CasterY = GetUnitY(Caster)
    real TargetX = GetUnitX(Targets)
    real TargetY = GetUnitY(Targets)
    private boolean first
endglobals

private constant function DMG takes integer LeVeL returns real
    return 12.5 * LeVeL * LeVeL - 12.5 * LeVeL + 25.
endfunction

private constant function ChannelTime takes integer level returns real
    return 1.25 * level * level
endfunction

private constant function Auraa takes integer lvl returns real
    return 950. * lvl
endfunction

private constant function UnderHP takes integer leb returns real
    return  - 0.5 * leb * leb + 4.5 * leb + 26
endfunction

function Check takes nothing returns boolean
    local unit u = GetFilterUnit()
    
    if IsUnitEnemy(u, GetOwningPlayer(HERO)) and GetWidgetLife(u)/GetUnitState(u, UNIT_STATE_MAX_LIFE) &lt; 0.3 then
        //DoStuff
    endif
    
    return false
endfunction

function Start takes nothing returns nothing
    call GroupEnumUnitsInRange(GROUP, GetUnitX(HERO), GetUnitY(HERO), 2500, function Check)
endfunction

private function Actions takes nothing returns nothing
    call UnitDamageTargetEx( Caster , Targets , DMG(GetUnitAbilityLevel(Caster, SpellID), true , true, ATTACK_TYPE_CHAOS , DAMAGE_TYPE_DIVINE , WEAPON_TYPE_METAL_LIGHT_SLICE)) 
    call AddEffect( &quot;DarkLigtning.mdx&quot;, TargetX,TargetY,0)
endfunction

private function Activate takes nothing returns nothing
    
endfunction

private function Cons takes nothing returns boolean
    return/*
    */ GetSpellAbilityId() == SpellID and/*
    */ GetWidgetLife(Targets) &lt;= UnderHP and not/*
    */ IsUnitType( Targets , UNIT_TYPE_HERO) and not/*
    */ IsUnitType( Targets , UNIT_TYPE_POLYMORPHED) and not/*
    */ IsUnitType( Targets , UNIT_TYPE_DEAD) and not/*
    */ IsUnitType( Targets , UNIT_TYPE_STRUCTURE)
endfunction


function Init takes nothing returns nothing
    local trigger Trigger = CreateTrigger( )
    call TriggerRegisterAnyUnitEventBJ( Trigger , EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition( Trigger , function Cons)
    call TriggerRegisterTimerEvent( Trigger , 0.00000000000000001 , true )
    call TriggerAddAction( Trigger , function Start)
endfunction


endlibrary


I fuck dont get anything to work anymore..
 

Bribe

vJass errors are legion
Reaction score
67
JASS:
library RunningBlood initializer Init requires Damage
    
native UnitAlive takes unit id returns boolean
    
globals
    private constant integer SpellID = &#039;A010&#039;
    private constant real Aura = 1250.
    private constant real Channel = 1.25
    private constant real RunTime = 5.5

    public unit Caster = null
    public unit Targets = null
    public group UnitGroup = CreateGroup( )
    
    private boolean first
    real CasterX
    real CasterY
    real TargetX
    real TargetY
endglobals
    
private constant function DMG takes integer level returns real
    return 12.5 * level * level - 12.5 * level + 25.
endfunction
private constant function ChannelTime takes integer level returns real
    return 1.25 * level * level
endfunction
private constant function Auraa takes integer lvl returns real
    return 950. * lvl
endfunction
private constant function UnderHP takes integer leb returns real
    return  - 0.5 * leb * leb + 4.5 * leb + 26
endfunction
    
function Check takes nothing returns boolean
    local unit u = GetFilterUnit()
    
    if IsUnitEnemy(u, GetOwningPlayer(Caster)) and UnitAlive(u) then
        //DoStuff
    endif
    
    set u=null
    return false
endfunction
    
function Start takes nothing returns nothing
    call GroupEnumUnitsInRange(GROUP, CasterX,CasterY, 2500., Filter(function Check))
endfunction
    
private function Actions takes nothing returns nothing
    set Caster=GetTriggerUnit()
    set TargetX=GetSpellTargetX()
    set TargetY=GetSpellTargetY()
    set CasterX=GetWidgetX(Caster)
    set CasterY=GetWidgetY(Caster)
    
    call UnitDamageTarget( Caster , Targets , DMG(GetUnitAbilityLevel(Caster, SpellID), true , false, ATTACK_TYPE_CHAOS , DAMAGE_TYPE_DIVINE , WEAPON_TYPE_METAL_LIGHT_SLICE)) 
    call AddSpecialEffect( &quot;DarkLigtning.mdx&quot;, TargetX,TargetY)
endfunction
    
    
private function Cons takes nothing returns boolean
    set Targets=GetSpellAbilityUnit()

    if GetSpellAbilityId() == SpellID and UnitAlive(Targets) and not IsUnitType( Targets , UNIT_TYPE_HERO) and not IsUnitType( Targets , UNIT_TYPE_POLYMORPHED) and not IsUnitType( Targets , UNIT_TYPE_STRUCTURE) then
        call Actions()
    endif
    return false
endfunction
    
function Init takes nothing returns nothing
    local trigger t = CreateTrigger( )
    call TriggerRegisterAnyUnitEventBJ( t , EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition( t , function Cons)
    
    call TimerStart(CreateTimer(),0.035,true,function Start)
endfunction
    
endlibrary
 

Executor

I see you
Reaction score
57
Well it is long ago that I coded my last channeling spell, but isn't [lJASS]EVENT_PLAYER_UNIT_SPELL_CHANNEL[/lJASS] the better event?

Btw. I suggest using GTrigger to you.
 

Bribe

vJass errors are legion
Reaction score
67
Yes, if it is a channeling spell. I thought this was (like most spells) just a cast-once spell :p
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
For channel spell, I suggest you attach the struct to caster and initialize end channeling event trigger. Else, if the spell is cooldownless, there will be bug.
 

Crazy_Dead

New Member
Reaction score
24
For channel spell, I suggest you attach the struct to caster and initialize end channeling even trigger. Else, if the spell is cooldownless, there will be bug.

Yeah, thanks for making this ever more difficultier.

So On Topic

@ Bribe

Your code, what does it mean?
I mean was that a fix or what?
 

Bribe

vJass errors are legion
Reaction score
67
What you'd benefit from is to get Subversion or basically any software that does a "compare to last save" function. Notepad++ does that.

Otherwise, just do an eyeball comparison to find the differences between the two. You'll notice, as someone else already pointed out, that you can' initialize values inside of the globals block, so I moved those. And I added the "UnitAlive" native and switched it in instead of your "GetUnitState" and "UNIT_TYPE_DEAD" stuff. I'd be happy to explain any one thing to you, but honestly you have to be the one to ask me specific questions. I don't like giving generic responses.
 

Bribe

vJass errors are legion
Reaction score
67
You require (more minerals) JASSHelper to save the map with the UnitAlive native in it, so yes, it's more or less vJass.

UnitAlive is found in the common.ai file, and is therefore not normally recognized by your map. I think this is the only useful native from the common.ai file (at least the only useful one I've seen).
 

Executor

I see you
Reaction score
57
Btw: Do not loop through all units in 2500 range.. Loop through all enemy heroes and check for distance and health ;)
My knowledge of arena map tells me, that there are enough creeps or summons which would be enumed too..
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • 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
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top