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

Problem with devour, and conditions

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hi, im trying to reproduce the scene from lord of the rings where watcher attacks fellowship and uses it's arms to catch them


There are my triggers


  • catching heroes
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Devour
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • watcherinteger[1] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Aragorn
              • (Unit-type of (Target unit of ability being cast)) Equal to Aragorn Bow
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using Aragorn_v1.mdx
          • Special Effect - Set Color of (Last created special effect) to color of Neutral Hostile
          • Special Effect - Set Scale of (Last created special effect) to 0.65
          • Set VariableSet watcherarmy[1] = (Last created special effect)
          • Set VariableSet watcherinteger[1] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • watcherinteger[2] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Boromir
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using Boromir_war3Style.mdx
          • Special Effect - Set Scale of (Last created special effect) to 0.60
          • Special Effect - Set Color of (Last created special effect) to color of Neutral Hostile
          • Set VariableSet watcherarmy[2] = (Last created special effect)
          • Set VariableSet watcherinteger[2] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Catched) Equal to True
          • watcherinteger[3] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Gandalf the Grey
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using war3mapImported\Gandalf.mdx
          • Special Effect - Set Scale of (Last created special effect) to 0.50
          • Special Effect - Set Color of (Last created special effect) to color of Player 9 (Gray)
          • Set VariableSet watcherarmy[3] = (Last created special effect)
          • Set VariableSet watcherinteger[3] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Catched) Equal to True
          • watcherinteger[4] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Frodo
              • (Unit-type of (Target unit of ability being cast)) Equal to Frodo Rock
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using frodo.mdx
          • Special Effect - Set Scale of (Last created special effect) to 0.40
          • Special Effect - Set Color of (Last created special effect) to color of Neutral Hostile
          • Set VariableSet watcherarmy[4] = (Last created special effect)
          • Set VariableSet watcherinteger[4] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Catched) Equal to True
          • watcherinteger[5] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Sam
              • (Unit-type of (Target unit of ability being cast)) Equal to Sam Rock
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using sam.mdx
          • Special Effect - Set Scale of (Last created special effect) to 0.40
          • Special Effect - Set Color of (Last created special effect) to color of Neutral Hostile
          • Set VariableSet watcherarmy[5] = (Last created special effect)
          • Set VariableSet watcherinteger[5] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Catched) Equal to True
          • watcherinteger[6] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Legolas
              • (Unit-type of (Target unit of ability being cast)) Equal to Legolas 1
              • (Unit-type of (Target unit of ability being cast)) Equal to Legolas 2
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using Legolas.mdx
          • Special Effect - Set Scale of (Last created special effect) to 0.60
          • Special Effect - Set Color of (Last created special effect) to color of Neutral Hostile
          • Set VariableSet watcherarmy[6] = (Last created special effect)
          • Set VariableSet watcherinteger[6] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Catched) Equal to True
          • watcherinteger[7] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Gimli
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using Gimli_LOTR_ByJhotam.MDX
          • Special Effect - Set Scale of (Last created special effect) to 0.50
          • Special Effect - Set Color of (Last created special effect) to color of Neutral Hostile
          • Set VariableSet watcherarmy[7] = (Last created special effect)
          • Set VariableSet watcherinteger[7] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Catched) Equal to True
          • watcherinteger[8] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Merry
              • (Unit-type of (Target unit of ability being cast)) Equal to Merry Rock
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using merry.mdx
          • Special Effect - Set Scale of (Last created special effect) to 0.40
          • Special Effect - Set Color of (Last created special effect) to color of Neutral Hostile
          • Set VariableSet watcherarmy[8] = (Last created special effect)
          • Set VariableSet watcherinteger[8] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Catched) Equal to True
          • watcherinteger[9] Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Pippin
              • (Unit-type of (Target unit of ability being cast)) Equal to Pippin Rock
        • Then - Actions
          • Unit - Set (Casting unit) movement speed to 35.00
          • Unit - Set (Casting unit) acquisition range to 100.00
          • Special Effect - Create a special effect attached to the chest of (Casting unit) using pippin.mdx
          • Special Effect - Set Scale of (Last created special effect) to 0.40
          • Special Effect - Set Color of (Last created special effect) to color of Neutral Hostile
          • Set VariableSet watcherarmy[9] = (Last created special effect)
          • Set VariableSet watcherinteger[9] = 1
        • Else - Actions





Ok so, this trigger checks who is the target and if the target is aragorn it creates aragorn's model as an attachment on arm's chest. i also use integer, to remove the special effects if arm with it dies.


My main problem about this is, during the fight even if arms dont devour the people the special effect will be still created on them. i dont really know whats the reason. but i need a way to apply the special effect when unit is 100% devoured. maybe arms try to devour same hero at same time? or they fail to do it because hero moves?

what can i do about it? is there any other condition to make sure the hero is alreday devoured. also i need to use special effect? why because its possible to scale heroes if they seem too big when being caught by arm




  • [/B]
  • remove effects
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Arm
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[1] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[1] = 0
          • Special Effect - Destroy watcherarmy[1]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[2] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[2] = 0
          • Special Effect - Destroy watcherarmy[2]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[3] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[3] = 0
          • Special Effect - Destroy watcherarmy[3]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[4] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[4] = 0
          • Special Effect - Destroy watcherarmy[4]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[5] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[5] = 0
          • Special Effect - Destroy watcherarmy[5]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[6] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[6] = 0
          • Special Effect - Destroy watcherarmy[6]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[7] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[7] = 0
          • Special Effect - Destroy watcherarmy[7]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[8] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[8] = 0
          • Special Effect - Destroy watcherarmy[8]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has buff Catched) Equal to True
          • watcherinteger[9] Equal to 1
        • Then - Actions
          • Set VariableSet watcherinteger[9] = 0
          • Special Effect - Destroy watcherarmy[9]
        • Else - Actions
  • [/[B]trigger][/B]
 
Last edited:
Level 11
Joined
Jul 17, 2013
Messages
544
Since no one answered i decided to give u more details and link the map,
upload_2020-7-6_19-9-54.png

i meant this is what happens the arm tired to use spell at gandalf i think but the gandalf isnt devoured however his effect is applied on the arm
 

Attachments

  • armbug.w3x
    45.1 MB · Views: 18
Status
Not open for further replies.
Top