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

[Spell] Bloodlust

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
this should work i think, i know it leaks but i dont got my file with anti-leak scripts atm
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bloodlust
    • Actions
      • Set temp_loc[(Player number of (Owner of (Casting unit)))] = (Position of (Casting unit))
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • Set unit_group = (Last created unit group)
          • For each (Integer A) from 1 to (Number of units in unit_group), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Shaman for Player 1 (Red) at temp_loc[(Player number of (Owner of (Casting unit)))] facing Default building facing degrees
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Here is an improved version of Darkgrom's trigger:

  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bloodlust
    • Actions
      • Set point = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in Units within 500.00 of point matching (Owner of (Mathing Unit)) is an ally of (Owner of Triggering Unit)) Equal to true and do (Actions)
        • Loop - Actions
          • Set point = Position of (Picked unit)
          • Unit - Create 1 Dummy for Owner of (Triggering Unit) at point facing Default building facing degrees
          • Unit - Add Bloodlust to Last created unit
          • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_point)
      • Custom script: call RemoveLocation(udg_point)
 
Last edited:

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Infinity loop example :D
Your trigger reacts on bloodlust spell cast, and what is the function doing? Creating dummy which cast next bloodlust!
Change the condition refering to ability being cast to some differend ability. Afterall you want to make non autocast BL. >.>

@Mr_Bean Trigger leaks location in case you redeclare it without destroying prevoius one. You need second parameter to make it properly.
You can improve the trigger a bit with (Owner of Triggering Unit)) >> (Triggering player) replacement. Additionaly, please add filter for alive and non structure units as Maker said.

@TaShadan Fixed trigger:
  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to SomeSpell
    • Actions
      • Set point = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in Units within 500.00 of point matching (((Owner of (Mathing Unit)) is an ally of (Triggering player) Equal to True) and ((Matching unit) is alive Eqaul to True) and ((Matching unit) is Building Not equal to True)) and do (Actions)
        • Loop - Actions
          • Set p = Position of (Picked unit)
          • Unit - Create 1 Dummy for (Triggering player) at point facing Default building facing degrees
          • Unit - Add Bloodlust to Last created unit
          • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_p)
      • Custom script: call RemoveLocation(udg_point)
Ofcourse, we can omit second location parameter and just create dummies in 'point = (Target point of ability being cast)', just make sure dummy's bloodlust has enough range to be castable.
 
Level 13
Joined
Jul 2, 2008
Messages
1,182
  • Unit Group - Pick every unit in (Units within 400.00 of point matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
    • Loop - Actions
      • Set point = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at point facing (Position of (Triggering unit))
      • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_point)
i just came that far :( iam too noob to put in "and"
spinnaker can you attach a dummy map with the trigger plz?
 
Last edited:
Status
Not open for further replies.
Top