Need help to create chidori spell

lokili

New Member
Reaction score
0
i need help with creating a chidori spell i know a few things like to make the special effect in the units hand but i don't know how to make the unit run very fast towards the enemy and pushing the enemy a little backwards, i know how to make the unit run to his enemy but not how to change movement speed. Can anyone tell me how to do this?
 

Moon_Raven

New Member
Reaction score
8
You can change it via this action:
Trigger:
  • TEST
    • Events
    • Conditions
    • Actions
      • Unit - Set <WHICH UNIT'S> movement speed to <WHAT SPEED>

And knockback is a bit harder to make in GUI, can I make it for you in JASS?

EDIT: And don't forget that max unit movement speed is 522.
 

lokili

New Member
Reaction score
0
sure you can.

*****************EDIT*****************
oh wait make me the JASS thingy but first explain how do i use JASS because im trying to learn that but it's not going to well i just can't learn a thing by myself and i can't find a guide anywhere
 

Moon_Raven

New Member
Reaction score
8
Well this is the knockback which fires when a unit casts a spell, and you'll have to make 4 variables to make it work:
#1 :Name: cast
Type: unit
#2 :Name:targ
Type: unit
#3 :Name: loc
Type: Point
#4 :Name: bool
Type: Boolean
Here's the code(name the trigger "Knockback":
JASS:
function CheckSpell takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction

function Knock takes nothing returns nothing
call SetUnitPositionLoc(udg_targ, PolarProjectionBJ(udg_loc, DistanceBetweenPoints(udg_loc, GetUnitLoc(udg_targ))+1.5, AngleBetweenPoints(udg_loc, GetUnitLoc(udg_targ))))
endfunction

function Start takes nothing returns nothing
local timer clock
set udg_cast = GetTriggerUnit()
set udg_targ = GetSpellTargetUnit()
set udg_loc = GetUnitLoc(udg_cast)
set clock = CreateTimer()
call TimerStart(clock,0.03,true,function Knock)
call TriggerSleepAction(2)
call DestroyTimer(clock)
set udg_cast=null
set udg_targ=null
set clock = null
call RemoveLocation(udg_loc)
set udg_loc=null
endfunction

function InitTrig_Knockback takes nothing returns nothing
local trigger gg_trg_Knockback = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Knockback, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Knockback, Condition(function CheckSpell))
call TriggerAddAction(gg_trg_Knockback, function Start)
endfunction

And in the condition part, the 'A000' should be replaced with spell code of your spell :)
 

lokili

New Member
Reaction score
0
ok tnx man. I need to learn how to create abilities with JASS because i used GUI all this time so it's kinda hard
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
i need help with creating a chidori spell i know a few things like to make the special effect in the units hand but i don't know how to make the unit run very fast towards the enemy and pushing the enemy a little backwards, i know how to make the unit run to his enemy but not how to change movement speed. Can anyone tell me how to do this?

Chidori dosen't push the enemy back, it is a peirceing attack. But you can create a item that is used when it is aquired with a speed boost ability on it, then just give the hero that item thru a trigger. Sence it is used when it is aquired it will be considered a tome and the hero will use it even if he has a full inventory, make sure to make it parishable.
 

Moon_Raven

New Member
Reaction score
8
JASS:
function CheckSpell takes nothing returns boolean
return GetSpellAbilityId() == 'A000' //Checks if the ability being cast is 'A000'
endfunction

function Knock takes nothing returns nothing
call SetUnitPositionLoc(udg_targ, PolarProjectionBJ(udg_loc, DistanceBetweenPoints(udg_loc, GetUnitLoc(udg_targ))+1.5, AngleBetweenPoints(udg_loc, GetUnitLoc(udg_targ)))) // Sets udg_targ's postition to be +1.5 distance away from the udg_cast. You can edit this to weaken or strenghten knockback power
endfunction

function Start takes nothing returns nothing
local timer clock
set udg_cast = GetTriggerUnit() //sets caster
set udg_targ = GetSpellTargetUnit()  //sets target
set udg_loc = GetUnitLoc(udg_cast)  //sets casters position
set clock = CreateTimer()
call TimerStart(clock,0.03,true,function Knock)  //does "Knock" action every 0.03 seconds
call TriggerSleepAction(2)  //How long you wait
call DestroyTimer(clock)    //until the timer is destroyed and function execution stops
set udg_cast=null //leak cleans
set udg_targ=null
set clock = null
call RemoveLocation(udg_loc)
set udg_loc=null
endfunction

function InitTrig_Knockback takes nothing returns nothing
local trigger gg_trg_Knockback = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Knockback, EVENT_PLAYER_UNIT_SPELL_EFFECT) //registers "Unit starts the effect of an ability event
call TriggerAddCondition(gg_trg_Knockback, Condition(function CheckSpell)) //and condtition(The one that is at the top of this piece of code)
call TriggerAddAction(gg_trg_Knockback, function Start) //adds the action to this trigger(the action named Start)
endfunction

Hope the comments clear things a bit for you :)
 

lokili

New Member
Reaction score
0
nope not a thing. I know how to put a JASS skill in the editor but dunno how to make my own with JASS....i got some of it but it's still too difficult
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
JASS:
function CheckSpell takes nothing returns boolean
return GetSpellAbilityId() == 'A000' //Checks if the ability being cast is 'A000'
endfunction

function Knock takes nothing returns nothing
call SetUnitPositionLoc(udg_targ, PolarProjectionBJ(udg_loc, DistanceBetweenPoints(udg_loc, GetUnitLoc(udg_targ))+1.5, AngleBetweenPoints(udg_loc, GetUnitLoc(udg_targ)))) // Sets udg_targ's postition to be +1.5 distance away from the udg_cast. You can edit this to weaken or strenghten knockback power
endfunction

function Start takes nothing returns nothing
local timer clock
set udg_cast = GetTriggerUnit() //sets caster
set udg_targ = GetSpellTargetUnit()  //sets target
set udg_loc = GetUnitLoc(udg_cast)  //sets casters position
set clock = CreateTimer()
call TimerStart(clock,0.03,true,function Knock)  //does "Knock" action every 0.03 seconds
call TriggerSleepAction(2)  //How long you wait
call DestroyTimer(clock)    //until the timer is destroyed and function execution stops
set udg_cast=null //leak cleans
set udg_targ=null
set clock = null
call RemoveLocation(udg_loc)
set udg_loc=null
endfunction

function InitTrig_Knockback takes nothing returns nothing
local trigger gg_trg_Knockback = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Knockback, EVENT_PLAYER_UNIT_SPELL_EFFECT) //registers "Unit starts the effect of an ability event
call TriggerAddCondition(gg_trg_Knockback, Condition(function CheckSpell)) //and condtition(The one that is at the top of this piece of code)
call TriggerAddAction(gg_trg_Knockback, function Start) //adds the action to this trigger(the action named Start)
endfunction

Hope the comments clear things a bit for you :)

It leaks badly. Use X and Y instead of locations.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • 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 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