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

[Trigger] Units leading to Start Location

Status
Not open for further replies.
Level 2
Joined
May 24, 2008
Messages
24
Hello.

This is happening to ALL my computer units.

When I create some unit, and that unit is doing nothing, or, if it was doing, for some reason stopped, it INSISTS to reach where the Start Location is located.

And I've changed it's place some times to test it, and yes, the unit RUNS to that place.

And this happens to either side of computer players.

For example,
I spawned two wolfs that have to attack the "triggering" unit and follows him, and it works fine. The wolf has a good sight radius for not letting the unit flee. But, when, for some reason the wolf lost the unit of sight, it goes straightly to the Start Location, for ANY cost. Like, even killing himself. This is so weird.

Another example,
I spawned a unit that has to go to a specific point when created. He simply does not go, and tries to reach the Start Location.

I really don't know what's this :eekani:

  • Wood Lord Spawn Kills
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WoodLordSpawned Equal to False
        • Then - Actions
          • Unit - Create 1 Wood Baron for Player 7 (Green) at (Center of WoodLord Region <gen>) facing Default building facing degrees
          • Set WoodLord = (Last created unit)
          • Special Effect - Create a special effect attached to the hand of WoodLord using Objects\InventoryItems\NightElfCaptureFlag\NightElfCaptureFlag.mdl
          • Special Effect - Create a special effect attached to the foot of WoodLord using Abilities\Spells\Orc\WarDrums\DrumsCasterHeal.mdl
          • Special Effect - Create a special effect at (Center of WoodLord Region <gen>) using Abilities\Spells\Other\Awaken\Awaken.mdl
          • Quest - Display to Players the Hint message: The |cff00ff00Wood ...
          • Set WoodLordSpawned = True
        • Else - Actions
          • Set WoodLordSpawned = False
          • Quest - Display to Players the Warning message: The |cff00ff00Woodl...
As you can see, there's no "Order Unit" here, because I've deleted it, and, still, it leads to the start location.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
The reason would be, that even if you have disabled all Ai scripts, there are still some who runs in the background. The reason could be that blizzard didn't want the ai to be complete incompetent...

Anyway I think you can fix this by adding the following in your script;
First at map initialization trigger

  • AI - Ignore the guard positions of all Player 1 (red) units //simply change to the correct player
Blizzard said:
This action tells the AI to neither use nor replace any of its preplaced units.

This means, that every new unit who is being summoned/created/trained/ will still act dumb like before.

We could however squeeze in the both systems in one trigger by doing this:
  • IgnoreAI
    • Events
      • Map initialization
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HasBeenInit Equal to False
        • Then - Actions
          • AI - Ignore the guard positions of all Player 1 (Red) units //Change to the correct player
          • Set HasBeenInit = True
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to Player 1 (Red) //Change to the correct player
            • Then - Actions
              • AI - Ignore (Triggering unit)'s guard position
            • Else - Actions
I think that is about it
/Regards
 
Level 2
Joined
May 24, 2008
Messages
24
It's possible to set it to All Picked Players, right?

You should open a trigger explaining that, it's quite important.
How do I rep?
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
well yes, then we need to modify it alittle - here is an update if you want for all players
  • IgnoreAI
    • Events
      • Map initialization
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HasBeenInit Equal to False
        • Then - Actions
          • For each (Integer TempInt) from 1 to 12, do (Actions) // Actually if you want to include Neutral Hostile/Passive/Victim/and Extra, the loop should end at 16, not 12.
            • Loop - Actions
              • AI - Ignore the guard positions of all (Player(TempInt)) units
          • Set HasBeenInit = True
        • Else - Actions
          • AI - Ignore (Triggering unit)'s guard position

(the +rep button is the one in the column under your name/avatar and looks like this:
reputation.gif
(You cannot rep yourself, that would be pretty messed up wouldnt it :p)

Under 10 reputation points your repping is just a gesture, nothing else, since it does not add reputation points to the desired user.

True indeed

Edit: Sorry for an accidental double post. It has been removed right away
 
Last edited:
Status
Not open for further replies.
Top