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

Uncontrollable summoned unit

Status
Not open for further replies.
Level 7
Joined
May 30, 2018
Messages
290
So I made this
upload_2019-5-4_19-38-52.png


Basically I wanted to summon a unit, which is NON-controllable, but still allied with the owner of the summoned unit, while being hostile towards every other player.
My trigger doens't work, it was an idea, but sadly it doesn't function. Now I'm looking for help :x
Thanks
 
Level 21
Joined
May 29, 2013
Messages
1,567
'Unit - A unit Spawns a summoned unit' only works with abilities that spawn units on death such as Spawn Hydra and Spawn Spiders.

You should use 'Unit - A unit enters (Playable map area)' instead.

I don't think the Player Alliance needs to be set every time a unit is summoned; you could move it to the Map initialization trigger.

You should make the owner of the summoned unit (entering unit if you change the event) treat Player 23 as an ally, as well as the other way around.
 
Level 7
Joined
May 30, 2018
Messages
290
'Unit - A unit Spawns a summoned unit' only works with abilities that spawn units on death such as Spawn Hydra and Spawn Spiders.

You should use 'Unit - A unit enters (Playable map area)' instead.

I don't think the Player Alliance needs to be set every time a unit is summoned; you could move it to the Map initialization trigger.

You should make the owner of the summoned unit (entering unit if you change the event) treat Player 23 as an ally, as well as the other way around.


upload_2019-5-4_22-56-8.png


That's how it looks now. Still doesn't work tho :/ The summoned unit is still hostile towards the player and the other way around , weird...
 
Last edited:
Level 16
Joined
May 2, 2011
Messages
1,345
you can do it in another way:

  • Event
    • -a unit is selected
    • -a unit is added to selection
  • Conditions:
    • or/any of these conditions
      • -unit type of selected unit is water elemental
      • -unit type of selected unit is spirit wolf
  • Actions
    • remove (selected unit) from player Selection
Though Im not sure if this is better than the one you already use :p
 
Level 9
Joined
Jul 30, 2018
Messages
445
That just makes the unit unselectable, which is quite different than being uncontrollable. For example, you might want to be able to select the unit, but not just able to order it around.
 
Level 12
Joined
Nov 3, 2013
Messages
989
JASS:
function UnitDisableControl takes unit u boolean flag returns nothing
        //toggles whether a unit responds to player commands on or off. Can still respond to trigger commands.

Coming soon™
 
Status
Not open for further replies.
Top