[Trigger] Can someone tell me what i did wrong with this trigger?*Move to Trigger forum*

Status
Not open for further replies.
Level 4
Joined
May 14, 2009
Messages
104
Sorry if the solution is obvious or this question was newby but i've been trying to figure out this spell for a while.
solved
The spell is called huntdown and this is it's description

Targets an enemy unit revealing it and making the doom tracker charge towards it. The enemy Unit takes 40 damage per second until the doom tracker catches the target. Upon catching it the target takes 10% of it's maxumum hp and creates a Demon if it dies.
it's based on shadowsight
Here are the triggers
  • HD
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to HuntDown
    • Actions
      • Set HuntDownCaster = (Casting unit)
      • Set HuntedTarget = (Target unit of ability being cast)
      • Unit - Create 1 Dummy Maelstomr for (Owner of HuntDownCaster) at (Position of HuntDownCaster) facing Default building facing degrees
      • Set HuntedDummy = (Last created unit)
      • Unit - Add Doom to HuntedDummy
      • Unit - Order HuntDownCaster to Attack HuntedTarget
      • Unit - Order HuntedDummy to Neutral Pit Lord - Doom HuntedTarget
      • Trigger - Run Dummy Run <gen> (ignoring conditions)
      • Trigger - Turn on Caught <gen>
  • Dummy Run
    • Events
      • Time - Every 0.08 seconds of game time
    • Conditions
    • Actions
      • Unit - Move HuntedDummy instantly to (Position of HuntedTarget)
  • Caught
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacked unit) Equal to HuntedTarget
    • Actions
      • Unit - Cause HuntDownCaster to damage HuntedTarget, dealing ((Life of HuntedTarget) / 10.00) damage of attack type Normal and damage type Normal
      • Trigger - Turn off Dummy Run <gen>
      • Unit - Kill HuntedDummy
      • Set HuntedDummy = No unit
      • Set HuntDownCaster = No unit
      • Set HuntedTarget = No unit
+rep for whoever can help me fix it.
 
Last edited:
Level 6
Joined
May 7, 2009
Messages
228
In the caught trigger, you aren't checking who the target was attacked by.

Also, I can't figure out what the purpose of the Dummy Run trigger is. Why are you moving the dummy?
 
Level 8
Joined
Aug 1, 2008
Messages
420
Well the dummy run looks broken... he wont run towards them, every 0.08 seconds he will teleport to the target... you need an offset if you want them to move gradually.
use "move unit and face point instantly"

  • Unit - Move HuntDownCaster instantly to ((Position of HuntDownCaster) offset by 15[change this as you like] towards (Facing of HuntdownCaster) degrees), facing (Position of HuntedTarget)
That should do it, but im not sure what else is wrong, because you didnt explain what is the bug.
 
Level 7
Joined
Mar 8, 2009
Messages
360
i know its offtopic but does it leak when you don't remove TempLoc and just overwrite it next time you set TempLoc?

EDIT: I didn't believed peeton :p , so i tested it but he was correct:
  • Untitled Trigger 001
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 200, do (Actions)
        • Loop - Actions
          • Set tempPoint = (Random point in (Playable map area))
this dropped my fps from 60 to 10 in 1 minute.
 
Last edited:
Status
Not open for further replies.
Top