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

Suicide Question

Status
Not open for further replies.
Level 5
Joined
Oct 3, 2009
Messages
93
To start, I have read all of the posts about this that are currently available, yet my issue remains and I have no idea why.

I have 3 locations on my map that spawn units and as they spawn I would like them to attack one of the player controlled units (4 players, 1 unit each) in the same manner that the Suicide command works, yet when I have tried to do everything that I have read on the suicide command, they just sit where they spawn.

I have this to run at the start. In player properties, player 5 is set to have Computer AI and Computer Control

  • AI
    • Events
      • Game - Map initialization
    • Local Variables
    • Conditions
    • Actions
      • AI - Start the campaign AI for player 5

And my spawning Trigger is

  • Forest
    • Events
      • Timer - Every 2.0 seconds of Game Time
    • Local Variables
    • Conditions
    • Actions
      • Unit - Create 1 Infested Terran (CPU) for player 5 at Forest facing (Position of (Last created unit)) (No Options)
      • AI - Enable suicide for (Last created unit)

Thank you in advance
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Unit - Create 1 Infested Terran (CPU) for player 5 at Forest facing (Position of (Last created unit)) (No Options)
This makes no sense as there is no "Last created unit" in that trigger before that point.

The simplest solution is to set the entire AI to suicide. That way all units it owns will seek the nearest viable target.

Do make sure the player is an enemy to the targets.
 
Level 6
Joined
Apr 15, 2012
Messages
205
I did, but with the players constantly moving and having more than one person, it bugs out and will just ignore a player, walking straight past them if they aren't the target.

Issue order them to attack move to the point of the enemy unit, that way, they will attack anything that comes in their way. When they stop and become idle, you could try to issue order them again to do the same thing again.
 
Level 5
Joined
Oct 3, 2009
Messages
93
That would work, but the suicide is more efficient in my case, as the players are usually moving and reording them to attack constantly (or when they decide to stop attacking) would be more a new issue than a solution.
 
Level 3
Joined
May 4, 2008
Messages
51
Make a behavior/ability that issue an order to attack X unit when not moving or idle. You can then add the behavior/ability to spawning units.
 
Level 5
Joined
Oct 3, 2009
Messages
93
I have the triggers that I posted enabled and on, and I placed a plain unit and made a trigger for AI to suicide all units 5 seconds into the game and it didn't do anything

Here is the player config, in case something is wrong with that.

CPU%20AI.jpg
 
Last edited:
Status
Not open for further replies.
Top