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

PLayer Computer picks hero; unavailable for all players

Status
Not open for further replies.
Level 4
Joined
Oct 12, 2012
Messages
19
How can i make the hero selected by computer players, unavailable to human players.

I have tried these

  • AI Command
    • Events
      • Time - Elapsed game time is 13.00 seconds
    • Conditions
    • Actions
      • Set Random_Hero = (Random integer number between 8 and 10)
      • Player Group - Pick every player in (All players matching (((Matching player) controller) Equal to Computer)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Picked player) at ((Picked player) start location) facing Default building facing degrees
          • Set Hero = (Unit-type of (Last created unit))
          • Player - Make Hero Unavailable for training/construction by (Picked player)
          • Special Effect - Create a special effect attached to the feet of (Last created unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) the text: (A player has randomed + (Name of (Last created unit)))
          • Set Random_Data[Random_Hero] = Random_Count
          • Set Random_Hero = (Random_Hero - (Random integer number between 1 and 2))
      • Player Group - Pick every player in (All players matching (((Matching player) controller) Equal to Computer)) and do (Actions)
        • Loop - Actions
          • Player - Make Hero Unavailable for training/construction by (Picked player)
      • Wait 5.00 seconds
      • Trigger - Turn on AI every 2 seconds <gen>
 
Level 4
Joined
Oct 12, 2012
Messages
19
and this (before)

  • AI Command
    • Events
      • Time - Elapsed game time is 13.00 seconds
    • Conditions
    • Actions
      • Set Random_Hero = (Random integer number between 8 and 10)
      • Player Group - Pick every player in (All players matching (((Matching player) controller) Equal to Computer)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Picked player) at ((Picked player) start location) facing Default building facing degrees
          • Player - Make Hero Unavailable for training/construction by (Picked player)
          • Special Effect - Create a special effect attached to the feet of (Last created unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) the text: (A player has randomed + (Name of (Last created unit)))
          • Set Random_Data[Random_Hero] = Random_Count
          • Set Random_Hero = (Random_Hero - (Random integer number between 1 and 2))
      • Wait 5.00 seconds
      • Trigger - Turn on AI every 2 seconds <gen>
 
Status
Not open for further replies.
Top