So I am writing triggers for attack waves with units added for various difficulty settings and here's why I think there should/must be a faster way of doing it
As you can see from the picture I have written "if the else" actions relating to the difficulty setting adding on extra units if the difficulty is harder. All of this works fine. Once I have written these triggers I then have to specify exactly what units are in the attack wave with a neat little action encompassing all 4 difficuly settings. "AI - Add (2/4/6/8) Marines to the attack wave". The (2/4/6/8) obviously specifying different units for different difficulties.
If I have specified these units why can I not then add a trigger along the lines of "Spawn specified attack wave units" e.g.
AI - Add (2/4/6/8) Marines to the attack wave
AI - Add (1/2/3/4) Marauders to the attack wave
"Spawn specified units for attack wave" << this does not exist to my knowledge. Should it? Am I doing this wrong? Is this something I shoud use functions for?
EDIT: In the mission 'Raynor 03' (this is the listed reference for attack waves) I can see no spawning triggers. I see units that are 'Available for attack waves' But these are not set to always replace on all difficulties, so where are the units coming from on this map? If knew that it would be a step forward.
Alot of this programming jagen confuses me so maybe that's where I go wrong. If anyone knows of "an idiots guide to C+ +" (I think thats the language that I need to know for GE) because this whole return true/false, boolean, all of the goes straight over my head but I have a great map going here :(
Help me elite mappers of SC2Mapster, you're my only hope. <<Star Wars reference
When you add units to an attack wave and order the Computer to send them, then he automatically looks if he has the same number of units in control he has to send. If not, he will build enough units to fit the number. So a trigger to spawn these units is not necessary.
A question: Do you initialize the Campaign AI before you use these Attack Wave Triggers? If not, then these triggers won`t work.
About 'Raynor 03': In this mission Zerg units are spawned at Nydus Worms and receive the "suicide" flag. This way they just run to the next enemy they see and try to kill it. It's a simple way to send attack waves. But I guess that they don't behave very smart like avoiding Psi Storms. Try it out.
I have set the attack wave now, just testing with one marine in the wave. The computer player is not supply blocked, they have resources and a barracks and campaign Ai is set at 400 apm. The computer is moving his dropship around as if he wants to pick up a marine but has not created one. What could be going wrong ?
Have you initialized the Campaign AI?
Also: Try to send the Attack Wave after you have added the unit. Then the Computer should build the Marine. Don't forget to set the target of the Attack Waves together with the Campaign AI Initialization. Example:
AI - Start the campaign AI for player 'Computer'
AI - Set the target for player 'Computer' attack waves to '(Player group(Player))'
I have the Campaign AI set. The trigger to set it is before the attack wave trigger in the list. I have attack wave target, waypoint and gather point set. I have tested the map with me as the computer player in question and I was able to build several marines. The attack wave works perfectly when I place a marine for him to use before testing the map. He just won't build one, I'm stumped.
Then let's try to find the problem: Does your Computer have a base with workers? When you start the AI Initialization, look if the workers are mining. If yes, then the AI is working properly. If not, then something is not right.
Also... Have you set the difficulty of the Computer? Like:
Player - Set player 'Computer' difficulty level to NORMAL
If not, then it could be that no units are added to the attack wave, because the difficulty is not set for the Computer.
Yes, the computer is mining, it doesn't build and building or construct SCVs as far as I have seen. I have set the difficulty of the computer and the attack wave does work (if I place the Marine myself). I'm really struggling to come up with ideas about what could be wrong here, it's tempting to give p and write some spawn triggers but the dynamic of the map just won't be the same.
This is all happening at the start of the map. Perhaps if I spawn the 1st few waves then the computer will get it together for the rest of them. But he has 89/200 supply, 2000 mins and 1000 gas so he should be fine. I'm going to keep rooting through Raynor 03.
I will look into this map, but it will take some time.
So please be patient. This problem must be solved. =)
Edit: Ok I have found the solution: 60 seconds are not enough for the Computer to build the Marine (even if to build the Marine actually takes only 25 seconds). I raised the time by 10 seconds (70 seconds now) and the Computer is building the Marine. Only problem is that the Marine won't attack the player after he has been built. With 80 seconds, the Computer builds the Marine and uses the Medivac to attack the player. So you have to play around with the time in the trigger until it works.
That's great news! I'll continue on the map right away, super exited. :D Again if you would like to be further involved in the making of the map then see the post with the map file attached. If not, I hope I can pm you if I have any more soul destroying trigger issues.
Summary - possible issues if your attack waves are not working
Campain AI not set for attacking player - trigger "start campaign AI"
Attacking player not given enough time to build units - Allocate attack wave time in the "send attack wave" trigger which comes after the "add units to attack wave". This way the AI knows what he needs to build before you allow him time to build it.
Make sure to "set target for attack waves" as well as "set waypoint for attack waves"
Check attacking player is not supply blocked. Check that workers are harvesting (if not then the "campaign AI" trigger is not executing correctly.
I have defined gather point and wave point for attack wave. Stil they don't actually gather to that point and they don't go to defined waypoint before attacking main target. I'm not exactly sure which is right order in trigger for things.
"AI - Send the attack wave from player 2 to attack in 60 seconds and Wait" I don't understand this. If my Event is "Elapsed time is 600.0 Game Time seconds" should that attack wave be sent when elapsed time is 660?
Same player has 2 bases and I want units to gather at gater point before they attack. Its not good that they half of the group attacks and dies and then other half does same thing.
Solved. Look at attached map file - it explains alot.
These triggers are actually really smart! I don't need to think how much time it takes to walk location A by waypoint B. If there is not enough units for attack wave AI will build enough units.
That wave has reached its target (=Attack wave target 1) in 600 game time seconds. It will go Waypoint1 first then Waypoint2. I have told for AI in map initialization that "this attack wave must have done these things at 600 game time seconds." If there is not enough units for attack wave AI will build missing units. (no less or more)
My trigger at the moment. I have an idea to create continuing attack wave. I'm sending attack waves manually for first 20 minutes, then I want to start continuing attack wave. I have 3 computer players in my map. I'm wondering can I make it some easy way so that if player 2 is dead / can't send those units then other players will?
EDIT: SOLVED - see post 13 for summary
So I am writing triggers for attack waves with units added for various difficulty settings and here's why I think there should/must be a faster way of doing it
As you can see from the picture I have written "if the else" actions relating to the difficulty setting adding on extra units if the difficulty is harder. All of this works fine. Once I have written these triggers I then have to specify exactly what units are in the attack wave with a neat little action encompassing all 4 difficuly settings. "AI - Add (2/4/6/8) Marines to the attack wave". The (2/4/6/8) obviously specifying different units for different difficulties. If I have specified these units why can I not then add a trigger along the lines of "Spawn specified attack wave units" e.g.
AI - Add (2/4/6/8) Marines to the attack wave
AI - Add (1/2/3/4) Marauders to the attack wave
"Spawn specified units for attack wave" << this does not exist to my knowledge. Should it? Am I doing this wrong? Is this something I shoud use functions for?
EDIT: In the mission 'Raynor 03' (this is the listed reference for attack waves) I can see no spawning triggers. I see units that are 'Available for attack waves' But these are not set to always replace on all difficulties, so where are the units coming from on this map? If knew that it would be a step forward.
Alot of this programming jagen confuses me so maybe that's where I go wrong. If anyone knows of "an idiots guide to C+ +" (I think thats the language that I need to know for GE) because this whole return true/false, boolean, all of the goes straight over my head but I have a great map going here :(
Help me elite mappers of SC2Mapster, you're my only hope. <<Star Wars reference
@saltydog87: Go
When you add units to an attack wave and order the Computer to send them, then he automatically looks if he has the same number of units in control he has to send. If not, he will build enough units to fit the number. So a trigger to spawn these units is not necessary. A question: Do you initialize the Campaign AI before you use these Attack Wave Triggers? If not, then these triggers won`t work.
@Oatin: Go
I have now seen the function in unit type and number relating to difficulty with the (#/#/#/#) structure which has solved my original problem.
In spawning trigger select unit number or type, select 'function' - Difficulty value
Thank you Oatin, I originall wanted the AI to build them but I thought that did not work, I will try again. thank's
@saltydog87: Go
About 'Raynor 03': In this mission Zerg units are spawned at Nydus Worms and receive the "suicide" flag. This way they just run to the next enemy they see and try to kill it. It's a simple way to send attack waves. But I guess that they don't behave very smart like avoiding Psi Storms. Try it out.
@Oatin: Go
I have set the attack wave now, just testing with one marine in the wave. The computer player is not supply blocked, they have resources and a barracks and campaign Ai is set at 400 apm. The computer is moving his dropship around as if he wants to pick up a marine but has not created one. What could be going wrong ?
@saltydog87: Go
Have you initialized the Campaign AI? Also: Try to send the Attack Wave after you have added the unit. Then the Computer should build the Marine. Don't forget to set the target of the Attack Waves together with the Campaign AI Initialization. Example:
AI - Start the campaign AI for player 'Computer'
AI - Set the target for player 'Computer' attack waves to '(Player group(Player))'
@Oatin: Go
I have the Campaign AI set. The trigger to set it is before the attack wave trigger in the list. I have attack wave target, waypoint and gather point set. I have tested the map with me as the computer player in question and I was able to build several marines. The attack wave works perfectly when I place a marine for him to use before testing the map. He just won't build one, I'm stumped.
@saltydog87: Go
Then let's try to find the problem: Does your Computer have a base with workers? When you start the AI Initialization, look if the workers are mining. If yes, then the AI is working properly. If not, then something is not right.
Also... Have you set the difficulty of the Computer? Like:
Player - Set player 'Computer' difficulty level to NORMAL
If not, then it could be that no units are added to the attack wave, because the difficulty is not set for the Computer.
@Oatin: Go
Yes, the computer is mining, it doesn't build and building or construct SCVs as far as I have seen. I have set the difficulty of the computer and the attack wave does work (if I place the Marine myself). I'm really struggling to come up with ideas about what could be wrong here, it's tempting to give p and write some spawn triggers but the dynamic of the map just won't be the same.
This is all happening at the start of the map. Perhaps if I spawn the 1st few waves then the computer will get it together for the rest of them. But he has 89/200 supply, 2000 mins and 1000 gas so he should be fine. I'm going to keep rooting through Raynor 03.
@saltydog87: Go
Well, how much time do you give the Computer to send the attack wave?
Or, could you please post your Trigger here? Maybe we can find something.
@Oatin: Go
map file attached - wave trigger "Raynor 03 waves" run by "run waves EDIT: file removed
EDIT: BTW if you would like to get involved further with the map I need help with data and trigger editing (more data editing). I need heroes and special buildings making. The official proposal thread is here - http://forums.sc2mapster.com/general/general-chat/15654-proposal-for-a-next-gen-base-defence-map-please-read/#p2
@saltydog87: Go
I will look into this map, but it will take some time. So please be patient. This problem must be solved. =)
Edit: Ok I have found the solution: 60 seconds are not enough for the Computer to build the Marine (even if to build the Marine actually takes only 25 seconds). I raised the time by 10 seconds (70 seconds now) and the Computer is building the Marine. Only problem is that the Marine won't attack the player after he has been built. With 80 seconds, the Computer builds the Marine and uses the Medivac to attack the player. So you have to play around with the time in the trigger until it works.
@Oatin: Go
That's great news! I'll continue on the map right away, super exited. :D Again if you would like to be further involved in the making of the map then see the post with the map file attached. If not, I hope I can pm you if I have any more soul destroying trigger issues.
Summary - possible issues if your attack waves are not working
Hey. I have some problem with attack waves.
I have defined gather point and wave point for attack wave. Stil they don't actually gather to that point and they don't go to defined waypoint before attacking main target. I'm not exactly sure which is right order in trigger for things.
Trigger:
"AI - Send the attack wave from player 2 to attack in 60 seconds and Wait" I don't understand this. If my Event is "Elapsed time is 600.0 Game Time seconds" should that attack wave be sent when elapsed time is 660?
Same player has 2 bases and I want units to gather at gater point before they attack. Its not good that they half of the group attacks and dies and then other half does same thing.
Solved. Look at attached map file - it explains alot.
These triggers are actually really smart! I don't need to think how much time it takes to walk location A by waypoint B. If there is not enough units for attack wave AI will build enough units.
Example of attack waves I'm using now:
That wave has reached its target (=Attack wave target 1) in 600 game time seconds. It will go Waypoint1 first then Waypoint2. I have told for AI in map initialization that "this attack wave must have done these things at 600 game time seconds." If there is not enough units for attack wave AI will build missing units. (no less or more)
I have activated Campaign AI in other trigger.
My trigger at the moment. I have an idea to create continuing attack wave. I'm sending attack waves manually for first 20 minutes, then I want to start continuing attack wave. I have 3 computer players in my map. I'm wondering can I make it some easy way so that if player 2 is dead / can't send those units then other players will?