• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

trouble with trigger

Status
Not open for further replies.
The test-map is pretty pointless since you don't even give the hero the ability.

You also could have posted your trigger:
  • Random
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to forky
    • Actions
      • Unit Group - Add (Target unit of ability being cast) to tempunitgroup
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set temppoint = (Position of (Target unit of ability being cast))
          • Set tempunitgroup2 = (Units within 400.00 of temppoint matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) is in tempunitgroup) Equal to False)))
          • Unit Group - Add (Random unit from tempunitgroup2) to tempunitgroup
          • Custom script: call DestroyGroup (udg_tempgroup2)
          • Custom script: call RemoveLocation (udg_temppoint)
          • Unit Group - Pick every unit in tempunitgroup and do (Actions)
            • Loop - Actions
              • Set temppoint = (Position of (Casting unit))
              • Set temppoint2 = (Position of (Picked unit))
              • Lightning - Create a Forked Lightning lightning effect from source (Position of (Casting unit)) to target temppoint2
              • Unit - Cause (Casting unit) to damage (Picked unit), dealing (2.00 x (Real(((Intelligence of (Casting unit) (Include bonuses)) x (Level of Unknown (A00M) for (Casting unit)))))) damage of attack type Spells and damage type Normal
              • Custom script: call DestroyGroup (udg_tempgroup)
              • Custom script: call RemoveLocation (udg_temppoint)
              • Custom script: call RemoveLocation (udg_temppoint2)
              • Wait 2.00 seconds
              • Set temppoint2 = (Target point of ability being cast)
You should try to be more descriptive:
What do you want your spell to do?
What isn't going right?

Edit:
I'm assuming you're trying to do a custom Forked Lightning.
I'll tell you some things that are wrong with your trigger:

  • No damage is dealt because you're checking the level of an unknown ability.
  • The lightnings never get destroyed.
  • Use Triggering unit over Casting unit.
 
ok well

one problem is

temppoint2 does not reset so they attack the new temppoint2 and old temppoint2

and also the lightning dosnt remove and ive tryed alot of triggers and i cant get it to remove without removing all of the lightning its self including after when it casts so theres no animation if i add a remove lightning spell
 
Okay I just went ahead and retriggered your spell.
  • ForkedLightning
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to forky
    • Actions
      • Unit Group - Add (Target unit of ability being cast) to tempunitgroup
      • Set temppoint = (Position of (Target unit of ability being cast))
      • Set tempunitgroup2 = (Units within 400.00 of temppoint matching ((((Matching unit) belongs to an enemy of (Triggering player)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to (Target unit of ability being cast)))))
      • Custom script: call RemoveLocation (udg_temppoint)
      • For each (Integer A) from 0 to 1, do (Actions)
        • Loop - Actions
          • Set RandomUnit = (Random unit from tempunitgroup2)
          • Game - Display to (All players) the text: (Unit Name + (Name of RandomUnit))
          • Unit Group - Add RandomUnit to tempunitgroup
          • Unit Group - Remove RandomUnit from tempunitgroup2
      • Set temppoint = (Position of (Triggering unit))
      • Unit Group - Pick every unit in tempunitgroup and do (Actions)
        • Loop - Actions
          • Set temppoint2 = (Position of (Picked unit))
          • Lightning - Create a Forked Lightning lightning effect from source temppoint to target temppoint2
          • Trigger - Run DestroyLightning <gen> (ignoring conditions)
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (2.00 x (Real(((Intelligence of (Triggering unit) (Include bonuses)) x (Level of forky for (Triggering unit)))))) damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation (udg_temppoint2)
      • Custom script: call RemoveLocation (udg_temppoint)
      • Unit Group - Remove all units from tempunitgroup
      • Unit Group - Remove all units from tempunitgroup2
  • DestroyLightning
    • Events
    • Conditions
    • Actions
      • Custom script: local lightning bolt = bj_lastCreatedLightning
      • Wait 2.00 game-time seconds
      • Custom script: call DestroyLightning(bolt)
 

Attachments

Status
Not open for further replies.
Back
Top