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.
  • The Helper The Helper:
    :) it is weird
  • The Helper The Helper:
    btw it was just lag the weirdness is gone
  • Wizard Wizard:
    I checked!
    +1
  • Blackveiled Blackveiled:
    How is everyone doing?
  • Wizard Wizard:
    Alright!
  • The Helper The Helper:
    Doing well thanks!
  • The Helper The Helper:
    Tom Mai check out the post I just found you made in 2006, from an apparent banned account, I do not remember that happening, the post is in the General Discussion Hall of Fame about record breakers
  • Blackveiled Blackveiled:
    Lmao thats somethin right there.
  • tom_mai78101 tom_mai78101:
    How far back were you looking at?
  • tom_mai78101 tom_mai78101:
    But yes, that was me.
  • The Helper The Helper:
    Do you think I am looking back in the forums for this stuff? LOL, no, I find these posts in the Members Online section or the stats - all these old posts I am bumping and moving around are what people are actually looking at on the website
  • tom_mai78101 tom_mai78101:
    Interesting.
  • The Helper The Helper:
    hey Tom your Burrito news is going viral by TheHelper.net standards LOL
  • The Helper The Helper:
    looks like The Burrito has been shared to facebook lol I am getting the facebook bots in now
  • The Helper The Helper:
    I am going to do one more News Forum like the Weird News but this one is Science News for all the cool science and technology articles in the Archive
  • tom_mai78101 tom_mai78101:
    Hmm, do I need to start posting some of the Science and Technology news to this new section in the future?
  • tom_mai78101 tom_mai78101:
    Or do we need to move the news to their respective sections once the threads are old enough, read to be put into the News Archive?
  • The Helper The Helper:
    The 2nd thing
  • The Helper The Helper:
    I have been moving stuff from the current Headline news like a year old and stuff over when I see it in the logs or members online but mostly I have been moving stuff from the Archives
  • The Helper The Helper:
    It is possible to automate it so that instead of moving to Archive if it has the Science, technology or sci tech tag that it gets archived there instead. I am considering a new Weird News Tag
  • tom_mai78101 tom_mai78101:
    Please do. I'll try to tag the news appropriately when I get the chance.
  • The Helper The Helper:
    The new Discourse forum software we are moving to next does alot with the tags and also hashtags
  • The Helper The Helper:
    OK I found the source of your burrito post stuff it is from Reddit and possibly a facebook post too but definitely reddit
  • The Helper The Helper:
    Happy Monday!

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top