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

Help with Global Suicide Trigger

Status
Not open for further replies.
Level 1
Joined
Mar 13, 2008
Messages
4
Im attempting to create a simple map to get used to the new more advanced Starcraft 2 editor. The map is a survival map and in the center zerglings will spawn every 10 seconds and "should hunt down" the marines on the map.

I have two triggers, one to start the spawn trigger so laggers are not eaten:

-Events- Elapsed game time is 15 Seconds -> -Action- Turn ZergSpawn On

My second trigger the spawning trigger looks like this:

-Events- Every 10 seconds of game time -> -Action- Create 1 Zergling for player 10 at Center of Zerg Spawn -> AI Suicide all player 10 units

The units spawn correctly, but they do not procede to attack the marine I placed on the map under my control. Any ideas?
 
Level 4
Joined
Jul 4, 2009
Messages
77
You may be missing the following action in your Map Initilization trigger.

  • Action -
  • AI - Start the campaign AI for player 10
Without it, some AI functions wont work properly.

And then on the trigger you are using to spawn the Zerglings, you can make it simpler than having it set the Suicide flag to all the units on the map owned by the player agaain... instead do this to prevent lag.

  • Action -
    • Unit - Create 1 Zergling for player 10 at (Center of 'Region') using default facing (No Options)
    • AI - Enable suicide for (Last created unit)
This way they are set to Suicide when they are created and it should remain on the unit until the die.
 
Level 8
Joined
May 31, 2009
Messages
439
This almost ressembles my map...but instead of taking some zerglings, I have banelings, and the banelings are controlled by the other team...not by an AI.

I am not very experienced with the AI, but by the looks of it here's what happening:

1. Every 10 seconds or so a certain amount of lings appear in the center of the map, the rest of the players are controlled by players.
2. You gave the lings the suicide ability, and it blows them ALL up every 10 seconds?

I think you should post some of your triggers up so you can help us, help you :). It iwll clear up most ofthe confusion.
 
Level 4
Joined
Jul 4, 2009
Messages
77
He;s not looking to have them actually 'suicide' and blow up. He's looking to have them have a suicide 'flag' that will make them hunt out and try and kill enemies without any other purpose in life.
 
Here's a copy of Zerg Assault, my first map, done in Beta.
It's very basic in terms of triggers.
Just so you know, I had to double everything, seeing as how it's set up to spawn zerglings at the top if the player is at the top of the map, and the bottom if the player is at the bottom of the map.
Of course I was new to Sc2 triggering, and it's not the best (seeing as how the zerglings will only go to the current position of the target unit (player) when the zerglings themselves spawn, and will stop there if they don't see the unit they are looking for.
I was thinking of adding a global trigger where every 5 seconds of game time ordering the zerglings to re-attack (either by making 4 different enemy teams, seeing as how there are 4 players) and 'assigning' one enemy team to one player.
That trigger could be done with 'Every 5 Seconds of Game Time, issue order targeting unit attached to region <Player 1 Main Unit> for all units owned by player <#>.'
Another idea is every 15 seconds of game time, issue order targeting (random point in (entire map)) to scan-move, ignore previous orders.
That trigger will cause the Zerglings to attack random positions in the map every 15 seconds. Useful if you want them to have a 'Wander' effect.

Edit: lol had to attach my map

Edit2: oh and btw.. to suicide the units every 15 seconds.. create a trigger with the following:
Event - Unit Enters (entire map)
Condition - Owner of (Triggering Unit) == Player # (owner of zerglings)
Actions - Wait 15 Seconds (Game Time),
Kill (Triggering Unit)
 

Attachments

  • Zerg Assault v0.30.SC2Map
    4.1 MB · Views: 103
Status
Not open for further replies.
Top