• 🏆 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!

Spell problem - need help

Status
Not open for further replies.
Level 5
Joined
Nov 29, 2007
Messages
106
Hi
I'v got problem - the spell not work what is wrong here?
The spell should look like:
our hero teleporting to target point, and when he land that point he deals 100/160/220/280 to enemies in that region and when he dealt damage he move instantly back to the casting point.
It's Polish version so:
event is unit starts effect of ability
Pętla - Akcje are Loop - Actions
btw i based on Blink ability
 

Attachments

  • trigger.JPG
    trigger.JPG
    151.7 KB · Views: 102
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

You mean something like that(?):

  • Blink123
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Blink
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempLoc2 = (Target point of ability being cast)
      • Set TempGroup = (Units within 600.00 of TempLoc2 matching ((((Matching unit) is Magic Immune) Equal to (==) False) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Picked unit) to damage (Picked unit), dealing (40.00 + ((Real((Level of (Ability being cast) for (Triggering unit)))) x 60.00)) damage of attack type Spells and damage type Normal
      • Unit - Move (Triggering unit) instantly to TempLoc
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
Greetings
~ The Bomb King > Dr. Boom
 
Level 5
Joined
Nov 29, 2007
Messages
106
I'v made this spell but it not work. what i have done wrong ?
 

Attachments

  • trigger2.JPG
    trigger2.JPG
    98.4 KB · Views: 73
Level 37
Joined
Mar 6, 2006
Messages
9,240
Use this to see whether the trigger runs at all or not:
  • Game - Display to (All players) the text: Yes
Create unit at target point of ability being cast to see if there is such point. Is a unit created?

Check the units in the Group:
  • Game - Display to (All players) the text: (String((Number of units in (TempGroupBarrel)))))
Use integer to string conversion.
 
Level 5
Joined
Nov 29, 2007
Messages
106
When i cast:
Yes
But this Game - Display to (All players) the text: (String((Number of units in (TempGroupBarrel))))) - IN GAME write 0
 
Level 5
Joined
Nov 29, 2007
Messages
106
First - it deals good damage but he not teleporting to target point of ability beign csast and after 0.6 sec he is not moving back to point where he cast it, second thing is it has no cooldown but i changed it to 13 sec, and i can use it from whole map but i changed range. any ideas why that bugs?
 
Level 5
Joined
Nov 29, 2007
Messages
106
I centered region on casting unit and after scripts i made 0.06 wait time and after it, it moves instantly to casting point, but now it deals no damage.... ffs
 
Level 5
Joined
Aug 16, 2010
Messages
97
Don't use Wait or anything related to it. Instead you can use a timer with 0.6 expiration time. I'll post a trigger in GUI for you, just wait a bit.
Here's the trigger. It works well and afaik, it's leakless.

  • Blink Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blink Strike
    • Actions
      • Set wait = 0.00
      • Set caster = (Triggering unit)
      • Set CasterPos = (Position of (Triggering unit))
      • Set TargetPos = (Target point of ability being cast)
      • Set TargetGroup = (Units within 400.00 of TargetPos matching ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is dead) Equal to False))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TargetGroup is empty) Equal to False
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to TargetPos
          • Unit - Pause (Triggering unit)
          • Unit Group - Pick every unit in TargetGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Magic
              • Unit Group - Remove (Picked unit) from TargetGroup
              • Set wait = (wait + 0.05)
          • Special Effect - Create a special effect at TargetPos using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Countdown Timer - Start t as a One-shot timer that will expire in wait seconds
        • Else - Actions
          • Game - Display to (All players) the text: No units in the tar...
  • After Wait
    • Events
      • Time - t expires
    • Conditions
    • Actions
      • Unit - Move caster instantly to CasterPos
      • Unit - Unpause caster
      • Custom script: call RemoveLocation(udg_CasterPos)
      • Custom script: call RemoveLocation(udg_TargetPos)
      • Custom script: call DestroyGroup(udg_TargetGroup)
      • Custom script: call DestroyEffect(GetLastCreatedEffectBJ())
 
Last edited:
Status
Not open for further replies.
Top