• 🏆 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!

Units acting on their own

Status
Not open for further replies.
Level 6
Joined
Jun 20, 2005
Messages
108
Here's my problem: I tried to create a system where the host can add computer slots to his team, and when the game starts there's an extra hero selector for each computer, and it shares its units' control with all human players.

Ok, it worked as I wanted. With the exception that the hero controlled units use their spells on their own! They use roar and howl of terror as if they had an AI controlling them.

I don't know anything about AI (or how to disable it), and I can't even identify if it's really an AI.

Can you guys help me?

Thanks.


EDIT: after more testing, i noticed that the computer is indeed using default actions like casting war stomp when there are more than 3 units near it. Is there a way to turn this "feature" off?
 
Last edited:
Level 5
Joined
Apr 8, 2006
Messages
130
I'm not sure whether it is a feature, the only reason I can think of it doing that is because the abilities have auto-cast on them. Check through your unit editor on the spells section and make sure none of the abilities have auto-cast on, also check through your triggers as you may be running an AI script for the hero player even when he's not got a computer controlling him.
 
Level 6
Joined
Jun 20, 2005
Messages
108
actually THERE IS a computer controlling it. It has a computer using that player slot, it just shares control with other players. What I'm trying to do is simply disable that computer from controlling the hero, perhaps disabling the AI for only this hero.
 
Level 5
Joined
Apr 8, 2006
Messages
130
Yeah, you'll need to turn off the AI on that hero or modify the AI script if you don't want it using abilities.
 
Level 5
Joined
Nov 12, 2007
Messages
134
Alternatively, you could always make a trigger to detect when the AI casts those spells and order it to stop like so:

  • Disable AI
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Roar
          • (Ability being cast) Equal to Howl of Terror
      • ((Owner of (Triggering unit)) controller) Equal to Computer
    • Actions
      • Unit - Order (Triggering unit) to Stop
Be sure to add all the spells you don't want the AI to cast in the "Or" conditions.

Edit:

In the Standerd meele Intialising in an Action called "Run Meele KI script" just turn it off.

No, thats for melee games...
 
Status
Not open for further replies.
Top