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

On selecting units...

Status
Not open for further replies.
Level 4
Joined
Aug 17, 2011
Messages
119
I want to make certain of a computer controlled players units selectable to ally players in game and allow these players to activate (cast at target area) a single ability of the selected unit.

Player 9 is my base defenders, the base has catapults that fire randomly into regions every 10 seconds. I want the other hero's (player 1 - 6) to be able to select one of player 9's catapults and have it fire a single shot at a target area.

How would you do this?
 
Level 4
Joined
Aug 17, 2011
Messages
119
nope, multiple shots by multiple different players. ability cool-down of 20s to prevent spamming.

"single shot" refers to the ability. (heavy damage, area effect, maybe fire.. blabla..)
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
the only way i could think is to create the catapult for player 10 or any player that is not used, change the color of the catapult to player 9's color (gray) and then share the unit to all the players.

something like this.

  • Untitled Trigger 002
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempPoint = (Center of (Playable map area))
      • Unit - Create 1 Siege Engine for Player 10 (Light Blue) at tempPoint facing Default building facing degrees
      • Unit - Change color of (Triggering unit) to Gray
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Player - Make Player 10 (Light Blue) treat (Player((Integer A))) as an Ally with shared vision and full shared units
          • Player - Make (Player((Integer A))) treat Player 10 (Light Blue) as an Ally with shared vision and full shared units
      • Custom script: call RemoveLocation (udg_tempPoint)
 
Status
Not open for further replies.
Top