• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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