• 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.

Unit Control (issue orders to non-owned units)

Status
Not open for further replies.
Level 7
Joined
Jun 16, 2008
Messages
253
Is there any way in which I could issue orders to units that weren't actually my own?

At the moment I'm simply using abilities from a spellbook to create a triggered version. But I'd like a way that my Leader hero could issue orders to any unit (non shared control) and perhaps even hostile, and then I would have a trigger that determined if the unit obeyed the order or not.
I think the potential for this in an RPG is obvious and HUGE, so any help would be awesome.

Cheers.
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
Yes, with triggers you can do like: Event: (choose what makes it do it)

It can be like Event: every 300 seconds (= 5 mins):
C:
A: order (select a unit on the map) to order(harvest) - this is tagret with no point)/ to order(attack) targeting aon object/ to attack-move to ... targeting a point

or

A: Pick every unit in units of type: and do whatever actions.

In order to make a PC smarter, I always use every 3 mins pick random 20 units from them and attack-move to position of random of my units.
 
Level 7
Joined
Jun 16, 2008
Messages
253
Sorry, I should of explained myself better.

Triggers can give any unit orders, I know that, but what I'm referring to is a player selecting a unit that he does not own, and telling it to move or attack as if he did own it. And then I would have a trigger that decides whether the unit obeys.

I think sort of like the neutral select unit ability, where anyone can tell the building to use the select unit on anyone, even though they don't control the building.

Do you see what I mean?

I'm supposing, though I haven't tried it yet, that I could just make a whole bunch of those neutral select unit abilities and change them to various commands, though I don't know if they'll work that way. Maybe the unit would have to be neutral. Or something.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
What you can do is: when a player selects a neutral unit, a dummy unit is created for this player which is automatically selected, as if you're selecting the neutral unit. Every e.g. 0.05 seconds it's instantly moved to the neutral unit so the selection circle is at the neutral unit. Since you actually selected a dummy instead of the neutral unit, you're giving orders to this dummy unit. Any order given to the dummy is ignored by it, but the orders will be duplicated for the actual neutral unit.
 
Level 7
Joined
Jun 16, 2008
Messages
253
That's a great suggestion! Thanks! Hope my arrays can handle the collateral trigger damage though. You'll see what I mean in my next map update.
 
Status
Not open for further replies.
Top