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

[Trigger] Not Work

Status
Not open for further replies.
Level 6
Joined
Nov 24, 2012
Messages
198
This is a problem
i making a spell with trigger in this map
The problem is why the enemy in the area doesn't knock back and doesn't drop the item?
TRIGGER
  • IR Active
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Item Rule
    • Actions
      • Set IR_Caster = (Triggering unit)
      • Set IR_Number = (Facing of IR_Caster)
      • Set IR_Caster_pos = (Position of IR_Caster)
      • Trigger - Turn on IR Effect <gen>
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 600.00 of IR_Caster_pos matching ((((Matching unit) belongs to an ally of (Owner of IR_Caster)) Equal to False) and ((((Matching unit) has (Item carried by (Matching unit) in slot 1)) Equal to True) and ((((Matching unit) has (Item carried by (M and do (Actions)
        • Loop - Actions
          • Set IR_Target = (Picked unit)
          • Set IR_Target_pos = (Position of IR_Target)
          • Unit - Order IR_Target to drop (Item carried by (Picked unit) in slot 1) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by (Picked unit) in slot 2) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by (Picked unit) in slot 3) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by (Picked unit) in slot 4) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by (Picked unit) in slot 5) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by (Picked unit) in slot 6) at IR_Target_pos
          • Trigger - Turn on IR Pushback <gen>
          • Custom script: call RemoveLocation(udg_IR_Target_pos)
      • Custom script: call RemoveLocation(udg_IR_Caster_pos)
  • IR Pushback
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Custom script: call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", udg_IR_Target, "origin"))
      • Set TempLoc = (Position of IR_Target)
      • Unit - Move IR_Target instantly to (IR_Caster_pos offset by ((Distance between IR_Caster_pos and TempLoc) + 10.00) towards (Angle from IR_Caster_pos to TempLoc) degrees)
      • Unit - Cause IR_Caster to damage IR_Target, dealing 150.00 damage of attack type Spells and damage type Demolition
      • Custom script: call RemoveLocation(udg_TempLoc)
  • IR Effect
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set IR_Number = (IR_Number + 15.00)
      • Set TempLoc = (Position of IR_Caster)
      • Set TempLoc2 = (TempLoc offset by 300.00 towards IR_Number degrees)
      • Custom script: call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl", udg_TempLoc2))
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
 

Attachments

  • Item Rule.w3x
    15.4 KB · Views: 47
Last edited:
Level 25
Joined
Jul 10, 2006
Messages
3,315
You should wait much more than 2 hours before double-posting.

And no, personally I don't really want to help you because your post is bad:
- Your problem is very vaguely described
- You don't specify if the problem is GUI/JASS/vJASS
- You haven't included the triggers. You can post the triggers by right-clicking on the trigger and selecting "copy as text" and pasting it here inside
  • tags.
  • - You're spamming emoticons and "help meeee"
  • So quite frankly I don't want to download your map.
  • Post the triggers as I have described and maybe then we can take a look.
 
Level 13
Joined
Mar 29, 2012
Messages
530
You have leaks everywhere and leaks will causing lags when you play that map, here is how to fix it :
  • IR Active
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Item Rule
    • Actions
      • Set IR_Caster = (Triggering unit)
      • Set IR_Number = (Facing of IR_Caster)
      • Set IR_Caster_pos = (Position of IR_Caster)
      • Trigger - Turn on IR Effect <gen>
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 600.00 of IR_Caster_pos matching ((Matching unit) belongs to an ally of (Owner of IR_Caster)) Equal to False) and do (Actions)
        • Loop - Actions
          • Set IR_Target = (Picked unit)
          • Set IR_Target_pos = (Position of IR_Target)
          • Unit - Order IR_Target to drop (Item carried by IR_Target in slot 1) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by IR_Target in slot 2) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by IR_Target in slot 3) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by IR_Target in slot 4) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by IR_Target in slot 5) at IR_Target_pos
          • Unit - Order IR_Target to drop (Item carried by IR_Target in slot 6) at IR_Target_pos
          • Trigger - Turn on IR Pushback <gen>
          • Custom script: call RemoveLocation(udg_IR_Target_pos)
      • Custom script: call RemoveLocation(udg_IR_Caster_pos)
  • IR Pushback
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Custom script: call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", udg_IR_Target, "origin"))
      • Set TempLoc = (Position of IR_Target)
      • Unit - Move IR_Target instantly to (IR_Caster_pos offset by ((Distance between IR_Caster_pos and TempLoc) + 10.00) towards (Angle from IR_Caster_pos to TempLoc) degrees)
      • Unit - Cause IR_Caster to damage IR_Target, dealing 150.00 damage of attack type Spells and damage type Demolition
      • Custom script: call RemoveLocation(udg_TempLoc)
  • IR Effect
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set IR_Number = (IR_Number + 15.00)
      • Set TempLoc = (Position of IR_Caster)
      • Set TempLoc2 = (TempLoc offset by 300.00 towards IR_Number degrees)
      • Custom script: call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl", udg_TempLoc2))
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
And your spell is not MUI (Multi Unit Instancability), so only one unit can use that spell...
 
Last edited:
Status
Not open for further replies.
Top