• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

trouble with trigger

Status
Not open for further replies.
Level 14
Joined
Nov 18, 2007
Messages
1,084
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.
 
Level 2
Joined
Aug 19, 2010
Messages
21
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
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
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

  • test.w3x
    20 KB · Views: 64
Status
Not open for further replies.
Top