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

It is possible to have a spell like this?

Status
Not open for further replies.
Confusion
=> The caster confuses the target making it randomly attack anything.

By this, you'll be saying "Give it to Neutral Hostile!"
No.

The confused unit will be hostile to enemy units and friend to friendly units, but behaves like a Neutral Hostile. Confused? :>

So the confused one is still a friend to it's owner and allies of the owner and enemy to enemies of the owner.
~Also, the confused unit can't be controlled~

Possible or not?

~supertoinkz
 
Last edited:
Level 6
Joined
Dec 9, 2007
Messages
208
Give it to Neutral Hostile! :D

No I don't really know then. Would say that giving it to Neutral Hostile and set color to owner of the unit.

That would be my best shot. ;)

Good luck
-Sinizi
 
Level 4
Joined
May 16, 2010
Messages
94
Maybe order him (trigger) to attack an enemy in in a circle of a X radious. I cannot check right now, but it's posible.
 
Level 14
Joined
Aug 31, 2009
Messages
775
If you periodically order the unit to attack allies it'd sort of override any orders the owner gives it.

You could also add a condition in such that when the unit attempts to attack an enemy, it gets instantly redirected to attack one of its own units.
 
Ok, it's made in a bit of a hurry, so I don't assure you of it being flawless. I have made some tests and it seems to be working though.
  • Zero
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Trigger - Add to One <gen> the event (Unit - (Picked unit) Takes damage)
      • -------- ------------------------------ --------
      • Hashtable - Create a hashtable
      • Set Hashtable = (Last created hashtable)
  • One
    • Events
    • Conditions
      • ((Damage source) is in Cgroup) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Key target) is stored as a Handle of (Key (Damage source)) in Hashtable) Equal to False
        • Then - Actions
          • Hashtable - Save Handle Of(Triggering unit) as (Key target) of (Key (Damage source)) in Hashtable
        • Else - Actions
  • Two
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to One <gen> the event (Unit - (Triggering unit) Takes damage)
  • Three
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Cgroup is empty) Equal to False
        • Then - Actions
          • Unit Group - Pick every unit in Cgroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Key target) is stored as a Handle of (Key (Picked unit)) in Hashtable) Equal to False
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Frost Armor) Equal to True
                    • Then - Actions
                      • Set Point1 = (Position of (Picked unit))
                      • Set TempGroup = (Units within (Current acquisition range of (Picked unit)) of Point1 matching ((Life of (Matching unit)) Greater than (0.41 - 0.05)))
                      • Unit - Order (Picked unit) to Attack (Random unit from TempGroup)
                      • Custom script: call DestroyGroup (udg_TempGroup)
                      • Custom script: call RemoveLocation (udg_Point1)
                    • Else - Actions
                      • Hashtable - Save Handle OfNo unit as (Key target) of (Key (Picked unit)) in Hashtable
                      • Unit - Order (Picked unit) to Stop
                      • Unit Group - Remove (Picked unit) from Cgroup
                      • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Life of (Load (Key target) of (Key (Picked unit)) in Hashtable)) Less than (0.41 - 0.05)
                    • Then - Actions
                      • Hashtable - Save Handle OfNo unit as (Key target) of (Key (Picked unit)) in Hashtable
                      • Unit - Order (Picked unit) to Stop
                      • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
                    • Else - Actions
        • Else - Actions
          • Trigger - Turn off (This trigger)
  • Four
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • ((Triggering unit) is in Cgroup) Equal to True
    • Actions
      • Set MainUnit = (Load (Key target) of (Key (Triggering unit)) in Hashtable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of MainUnit) Greater than (0.41 - 0.05)
        • Then - Actions
          • Wait 0.00 seconds
          • Unit - Order (Triggering unit) to Attack MainUnit
        • Else - Actions
  • Five
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frost Armor (Autocast)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in Cgroup) Equal to False
        • Then - Actions
          • Unit Group - Add (Target unit of ability being cast) to Cgroup
          • Trigger - Turn on Three <gen>
        • Else - Actions
  • Six
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in Cgroup) Equal to True
    • Actions
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Hashtable
      • Unit Group - Remove (Triggering unit) from Cgroup
Test Map: View attachment Confusion.w3x


So, in the test map, cast Frost Armor. This is your detecting tool in the first place. I assumed that the unit under the effect of the confusion will have a buff attached to it and it should have, since it is easier to work with (else, timers would be involved).
 
Status
Not open for further replies.
Top