How to make a "link" ability

shinami

Redirect your complaints to the nearest wall
This is the ability i want to do.

Link Healing - Links to the target unit with SomeLightningEffect and heals him for x. If the healing unit or the healer is further than 500 range, the link will brake.

The healing part is not hard, the link is what i have no idea how to do, and the link braking. I want this to be a single target Activable,Deactivable skill.

So, any ideas?
 

saw792

Is known to say things. That is all.
Create the lightning effect and such as the ability is being channeled, then have a periodic trigger check if the target unit is within range. Making it MUI is more difficult... do you know JASS?
 

shinami

Redirect your complaints to the nearest wall
Create the lightning effect and such as the ability is being channeled, then have a periodic trigger check if the target unit is within range. Making it MUI is more difficult... do you know JASS?
Don't know jass, and the bolded part i didn't quite understand.

Could you explain it a bit more detailed?
 

saw792

Is known to say things. That is all.
Oh sorry... I assumed it was a channelling ability.
The best idea would be to base it off a single target dummy ability. When it is cast, create the lightning effect between the target unit and the caster (Lightning - Create lighting using... between...). Then remove the 'on' ability for the casting unit, and replace with the 'off' ability. You then need two methods of cancelling: When the caster casts the off ability and when the unit target unit is outside of 500 range (periodic trigger). This way would be single instance. If you want I could make you an MUI Jass version. Do you have Newgen?
 

Accname

2D-Graphics enthusiast
i could make you a not MUI version, you need 5 variables (lightning/Caster/Target/PointOfCaster/PointOfTarget) and 3 triggers:
Code:
Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to 'HealingLight' 
    Actions
        Set TargetUnits[1] = (Casting unit)
        Set TargetUnits[2] = (Target unit of ability being cast)
        Set TempPoint[1] = (Position of TargetUnits[1])
        Set TempPoint[2] = (Position of TargetUnits[2])
        Lightning - Create a lightning effect Healing Wave - Primary TempPoint[1] TempPoint[2]
        Set Lightning = (Last created lightning effect)
Code:
UnCast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to 'HealingLight' 
    Actions
        Lightning - Destroy Lightning
        Unit - Remove Healing Light buff from TargetUnits[2]
        Set TargetUnits[1] = No unit
        Set TargetUnits[2] = No unit
Code:
Effect
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set TempPoint[1] = (Position of TargetUnits[1])
        Set TempPoint[2] = (Position of TargetUnits[2])
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (TargetUnits[1] is alive) Equal to True
                        (TargetUnits[2] is alive) Equal to True
                        (Distance between TempPoint[1] and TempPoint[2]) Less than or equal to 500.00
                        (TargetUnits[2] has buff Healing Light) Equal to True
            Then - Actions
                Lightning - Move Lightning TempPoint[1] TempPoint[2]
                Unit - Set life of TargetUnits[2] to ((Life of TargetUnits[2]) + 50.00)
            Else - Actions
                Lightning - Destroy Lightning
                Unit - Remove Healing Light buff from TargetUnits[2]
                Set TargetUnits[1] = No unit
                Set TargetUnits[2] = No unit
        Custom script: call RemoveLocation (udg_TempPoint[2])
        Custom script: call RemoveLocation (udg_TempPoint[1])
'HealingLight' is your skill

i repeat this is not MUI!!!

Attached is a demo map for you to see how it looks.
 

vaziocs

New Member
This is the ability i want to do.

Link Healing - Links to the target unit with SomeLightningEffect and heals him for x. If the healing unit or the healer is further than 500 range, the link will brake.

The healing part is not hard, the link is what i have no idea how to do, and the link braking. I want this to be a single target Activable,Deactivable skill.

So, any ideas?
i think u can use the healing ability from the shadow hunter and just add and lightning effect.
 

shinami

Redirect your complaints to the nearest wall
Oh sorry... I assumed it was a channelling ability.
The best idea would be to base it off a single target dummy ability. When it is cast, create the lightning effect between the target unit and the caster (Lightning - Create lighting using... between...). Then remove the 'on' ability for the casting unit, and replace with the 'off' ability. You then need two methods of cancelling: When the caster casts the off ability and when the unit target unit is outside of 500 range (periodic trigger). This way would be single instance. If you want I could make you an MUI Jass version. Do you have Newgen?
Yeah, i do, if you can please do make. ;)
 

ThePlague

New Member
heres how you could do it in JASS, this will leak though make sure you null the locals

convert to custom text and paste function X_Actions above the actions for your trigger and paste the other part into the action function of your trigger

JASS:
function X_Actions takes unit Target, unit Caster returns nothing
local location CasterLoc=GetUnitLoc(Caster)
local location TargetLoc=GetUnitLoc(Target)
if (DistanceBetweenPoints(CasterLoc, TargetLoc) > 500) then
//actions you want to happen when the target is out of range
endif
endfunction

function Main_Trigger_Actions
local trigger X=CreateTrigger()
local unit Target=GetSpellTargetUnit()
local unit Caster=GetTriggerUnit()
    call TriggerRegisterTimerEventPeriodic( X, .10) 
    call TriggerAddAction( X, function X_Actions )
//actions for your spell
endfunction



if this doesnt solve your problem post your full trigger and i can help more
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    Would like to get some annual forum statistics report.
  • The Helper The Helper:
    there are stats in the xenforo forum admin section and we have matomo stats we started collecting beginning of the year so we will not have annual on that until next year
  • The Helper The Helper:
    I thought you had keys to the bathroom Tom? Ghan does Tom have access to the stats thread in the bathroom
  • The Helper The Helper:
    since I started jacking with the bots on the site we doubled our page views on the site in a week lol
  • The Helper The Helper:
    I have been having lots of fun
  • The Helper The Helper:
    we have had like 6000 views of the American Airlines economy class thread in the last week
  • The Helper The Helper:
    I ought to stick a travel affiliate link or something on that page to try and monetize that they are just going there and leaving it might even be bots I am not sure
  • The Helper The Helper:
    I just got into it with the Atari VCS Facebook Moderator I started trolling him and almost got banned
  • The Helper The Helper:
    They deleted one of my posts one time so I was trolling him on a help post I put up because I am evil I guess and bored and the guy handled it well I loved his attitude Atari has a good social media presence even if they do not have many games.
  • The Helper The Helper:
    The French Atari they call them even though they are like totally based in America they just have French Money coming in. Gotta love it
  • Ghan Ghan:
    Microsoft buying Activision Blizzard holy crap!
  • The Helper The Helper:
    I know right holy cow
  • Accname Accname:
    Thats not going to save it.
  • The Helper The Helper:
    It might
  • The Helper The Helper:
    They are going to use alot of that IP in the Metaverse
  • The Helper The Helper:
    I found a new section of the stats that is freaking interesting!
  • The Helper The Helper:
    oh yeah this is what I was looking for good job matomo! These are some sweet stats I am learning the interface on it too!
  • The Helper The Helper:
    If anyone ever asks later how I found out about it was watching the site bots but not watching what they were doing but asking myself why they were here?
  • The Helper The Helper:
    there must be a reason and ok that is it
  • The Helper The Helper:
    the past and the future all come together into one
  • The Helper The Helper:
    the search engines are what built thehelper.net the search engines will make it big again maybe
  • The Helper The Helper:
    the real question is are 5 million links better than 60 real good links?
  • The Helper The Helper:
    the answer is 60 lol
  • The Helper The Helper:
    unless you put 100k links on it lol then you get something

    Staff online

    • Ghan
      Administrator - Servers are fun

    Members online

    Affiliates

    Hive Workshop NUON Dome
    Top