• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Help to cool and usefull spell

Status
Not open for further replies.
Level 3
Joined
Oct 20, 2011
Messages
26
What's wrong with my trigger?

Hello, i am making my own RPG-map and want some help to a trigger.
The trigger Make a lightning effect to all enemies in 700 range around the Caster. the problewm is that my other trigger that make the lightning effect move doesnt turn on when i ask it to do it. And even if it turn on i doesnt move to hte position i told iit to do. help me please!!!! HERE IT IS:

Events:
Unit - A unit starts the effect of an ability

Conditions:
(Ability being cast) Equal to (My spell)

Actions:
Unit Group - Pick every (unit in 700 of (Position of (Casting unit))) and do (Actions)
Loop - Action:
If (All Conditions are True) then do (Then Action) else do (Else Action)
If - Conditons:
(Owner of (Picked unit)) Equal to Neutral Hostile
Then - Actions:
Lightning - Create a Drain Life lightning effect from source (Position of (Casting unit)) to target of (Picked unit))
Set Lightning_Effect_Enemies = (Last created lightning effect)
Trigger - Turn on Lightning Effect Trigger <gen>
Wait 5.00 seconds
Trigger - Turn off Lightning Effect Trigger <gen>
Lightning - Destroy Lightning_Effect_Enemies
Else - Actions:
Do nothing



Lightning Effect Trigger:

Events:
Time - Every 0.03 seconds of game time

Conditions:

Actions:
Lightning - Move Lightning_Effect_Enemies to source (Position of (Casting unit)) and target (Position of (Picked unit))

(when i make new postion of the effect the position of the picked unit still counts at the point it was from the start (even if the picked unit move))
 
Level 3
Joined
Oct 20, 2011
Messages
26
I know that things leak.. that's why i need help. Can some1 please post a trigger like mine that works?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here's a trigger like that. Use a lightnting array instead of special effect array.


  • Untitled Trigger 040
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Custom script: local integer c = udg_scount
      • Set point = (Center of (Playable map area))
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • Set point2 = (point offset by 256.00 towards (Random real number between 0.00 and 360.00) degrees)
          • Special Effect - Create a special effect at point2 using Abilities\Spells\Other\AcidBomb\BottleImpact.mdl
          • Set ear[(scount + (Integer A))] = (Last created special effect)
          • Custom script: call RemoveLocation(udg_point2)
      • Custom script: call RemoveLocation(udg_point)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • scount Greater than 8000
        • Then - Actions
          • Set scount = 0
        • Else - Actions
          • Set scount = (scount + 9)
      • Wait 2.00 seconds
      • Custom script: set udg_i1 = c
      • For each (Integer A) from i1 to (i1 + 9), do (Special Effect - Destroy ear[(Integer A)])


variable name / type
i1 / integer
scount / integer
point / point
point2 / point
and a lightning array
 
Status
Not open for further replies.
Top