Lightning Line an Bounce Attacks

Twilight33

New Member
Reaction score
4
ok i have a heroe in the game i'm making it is supposed to have a missile line attack that looks like the lighting from chain lightning, and its supposed to just fire a striaght lightning bolt all the way to the end of the missle line spill distance for the attack. the problem is that the missile just stops and dispates at the primary target hit. i also am unable to find the lightning effect for chain lightning to set for my projectile art.

i assumed the best way to do this was to just have a trigger do the lightning effect every time the hero attacks. and im assuming that the "Lightning - Create Lightning Effect" action will give me the cosmetic look im looking for. my question is how do i set the trigger up to do this properly. i took a wild swing at it but it doesnt look right. doing it this way would create multiple bolts for each unit hit in the attack line. how do i fix this?

Untitled Trigger 001
Events
Unit - A unit Is attacked
Conditions
(Attacking unit) Equal to The Hero
Actions
Lightning - Create a Chain Lightning - Primary lightning effect from source (Position of (Attacking unit)) to target (Position of (Triggering unit))
Wait 1.00 seconds
Lightning - Destroy (Last created lightning effect)

also how would i alter this so it works for a hero with a bounce attack?
 
Isnt it against the attacked unit?

Because you got it on "Attacking Unit". I don't know im not that great with this kind of stuff.
 
I suggest the following changes:

Variables: BounceTargets (unit group), AttackedUnit (unit), LightningBounce (lightning effect, array with as many elements as you want bounces)

Code:
Untitled Trigger 001
    Events
        Unit - A unit Is attacked
    Conditions
        (Attacking unit) Equal to The Hero
    Actions
        Lightning - Create a Chain Lightning - Primary lightning effect from source (Position of (Attacking unit)) to target (Position of (Triggering unit))
        Set BounceTargets equal to (All units within (400 of (Attacked unit)))
        Set AttackedUnit equal to (Attacked unit)
        For each Integer A from 1 to <max number of bounces>, do (Actions)
            Loop - Actions
                Pick a random unit in BounceTargets and do (Actions
                    Loop - Actions
                        Add (Picked unit) to CustomValueUnitGroup
                        Set the custom value of (Picked unit) to 1
                        Lightning - Create a Chain Lightning - Secondary lightning effect from source (Position of AttackedUnit) to target (Position of (Picked unit))
                        Set LightningBounce[Integer A] equal to (Last created lightning effect)
                        Deal (Picked unit) <your number> damage
                        Set BounceTargets equal to (All units within (400 of Picked unit)) matching ((Custom value of (Matching unit)) Not equal to 1)
                        Remove (Picked unit) from BounceTargets
                        Set AttackedUnit equal to (Picked unit)
        Pick every unit in CustomValueUnitGroup and do (Set (Custom value of (Picked unit)) equal to 0)
        Wait 1.00 seconds
        For each Integer A from 1 to <max number of bounces>, do (Actions)
            Loop - Actions
                Destroy LightningBounce[Integer A]
                Custom script:    call DestroyGroup( udg_BounceTargets )
                Custom script:    set udg_AttackedUnit = null
                Custom script:    set udg_LightningBounce[bj_ForLoopAIndex] = null
I'm a little shaky on the last two lines, but I think they work and fix memory leaks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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