• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Seeking solution to a problem with "uncontrolble" units.

Status
Not open for further replies.
Level 15
Joined
Nov 26, 2005
Messages
1,151
Ok, hello guys.

I've wanted to know and now I'd really like to ask how does the "Castle Fight" map does it:
The units that spawn, they are completely uncontrollable by the player (as if they are wards - they have no UI, and if u select them and try right-clocking, they won't move or anything) but still they cast all their spells, players gain bounty from kills and units "talk" to you when created/clicked.

Please, I'd like to hear any solutions.
+ Rep for all helpful answers, ofc.
 
Level 15
Joined
Oct 16, 2010
Messages
942
I wasn't able to run the map you are talking about in War 3 but from the sounds of it you're just talking about an allied computer player that controls the spawned creeps. You can't control them, they cast abilities, enemies get gold from killing them, and they make sounds if you click them.

I dunno, am I way off here?
 
I dunno if this will work...
  • Spawn
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
    • Actions
      • Set temp_group = (All players controlled by a User player)
      • Player Group - Pick every player in temp_group and do (Actions)
        • Loop - Actions
          • Custom script: if GetLocalPlayer() == GetEnumPlayer() then
          • Custom script: call UnitAddAbilityBJ( 'Aloc', GetTriggerUnit() )
          • Custom script: endif
      • Custom script: call DestroyForce(udg_temp_group)
 
Level 15
Joined
Nov 26, 2005
Messages
1,151
Well, if the owner is an allied computer with preserved color, how can a player gain gold if the unit kills another unit, and how can a player hear the sounds of a unit. I mean even the selection cirle of the units is green! (It's not like in dota 6v6)

Is there no way to do this ? :?
 
Level 3
Joined
Apr 17, 2008
Messages
41
defskull is correct. You must make the unit classified as a ward.

The only order you'll be able to give the unit is "smart" (right-clicking, assuming the unit can move and/or attack).

If you want to disable the control of these units completely, you will need to create a trigger that goes off every time a unit (classified as a ward) is given the order "smart". What ever you have the unit do after that is up to you.
 
Level 15
Joined
Nov 26, 2005
Messages
1,151
Sorry, I guess I can't explain what I am looking for ...

The unit MUST move/attack/cast spells and stuff (ordereed on event with triggers) but must be unable to perform any smart commands and have no UI.

Just like in the map Castle Fight ...

So imagine a sorceres is spawned for player 1. It is ordered to attack to Region A. So she will moving and engage any target she comes accros BUT if player 1 clicks on that sorc and right clicks, she MUSTN't break her orders, and just continue moving towards region A. I can't exaplin it better ... sorry :(
 
Level 3
Joined
Apr 17, 2008
Messages
41
I seemed to have explained it incorrectly.
"smart" is the only command that you as a player (in the game) will be able to give the unit. The unit will still have all of its abilities and will be able to use them through triggers.
 
Level 15
Joined
Nov 26, 2005
Messages
1,151
Sesamia, I tried with the ward method. Everything is ok - the unit does everything it is triggered to do and has no UI, BUT the righ-click still works. IS there a way I can make a unit ignore a right-click command and continue to follow what it was triggered-issued to do ?
 
Level 3
Joined
Apr 17, 2008
Messages
41
defskull is correct. You must make the unit classified as a ward.

The only order you'll be able to give the unit is "smart" (right-clicking, assuming the unit can move and/or attack).

If you want to disable the control of these units completely, you will need to create a trigger that goes off every time a unit (classified as a ward) is given the order "smart". What ever you have the unit do after that is up to you.

There.

Edit: So in the actions, you could just make the unit attack/move to a location.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
there's no noticeable difference for the player between 0.01 and 0.03 and 0.03 runs better for people with slow connections. Get too many 0.01s and it's gonna lag, regardless of the fact that its a spell or not, >.>
 
Status
Not open for further replies.
Top