Posted: Sun Oct 15, 2023 1:05 am Post subject:
Repeating Create Team problem
Subject description: 3 rocketeers keep being created but 1 SEAL is only created once unless killed.
I created a trigger for a team to be created. I created 3 Rocketeers to go on one spot. The rocketeers comes from another team: 5 GI, 5 Rocketeer, 5 Attack Dog. The repeating trigger keeps making 3 Rocketeers on the spot.
I tested it with preplaced SEALs with a repeating "Create Team" trigger and it only creates the team everytime the team dies. So if I made a trigger where 1 SEAL is the team. Unless I kill the SEAL, it won't recreate the team again QUICK_EDIT
Well you should explain how you want it to repeatedly create the team first. Like if you wanted it created at intervals, then you'd want a looping trigger with a time based interval (random delay is best)...
If the point is to replace the destroyed team as needed, then you could do a trigger event based on the existence of the Seal.
IF you want to combine both effects, replace only if destroyed, but only at given intervals, then you could use a trigger to set a variable that the unit died as one of the event conditions for the creation trigger. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
Sorry for late response. But as for G-E, I wanted to create teams inside the base with the intention of recruiting them later. They are created first then gets used to create a different team to attack the base. This is so there are still reserves within the base to guard it but still recruitable.
Essentially I'm trying to use the recruitable units as the guard for the base. This is because I want the base to be guarded first before creating teams to attack the player. Why? It's because the money for the ai runs out and if the player attacks it won't be able to defend itself.
It is top priority to have the base guarded first before attacking the player. There are still pre-placed units in the base but they were meant to be destroyed and also they don't have as much variety in them as the team meant to attack the player.
As for E1 Elite, I was able to make the team that I wanted but it wasn't in what the post you made. I changed the Autocreate to Prebuild and that essentially stopped the team from being created if the team is complete unlike Autocreate where it just keeps making the team over and over again whenever the condition for the repeating trigger are met.
Hadn't tried checking the missions yet but I'm guessing that it first creates the team in a waypoint than that team attacks the player. At least that's what I assume is in most of the mission. Which doesn't really resolve my issues of having the team being created over and over again.
As for more details, here is a screenshot for my trigger:
As that recruitment tutorial is for a bit advanced mappers, you have to read it multiple times. Autocreate doesn't mean to create teams automatically, that term is carried over from RA1. In RA2 it is related to recruit from pre-placed units or to build from factory.
In general, a reserve/pool team should have AreTeamMembersRecruitable=yes and its Priority should be less than the team that will be recruiting.
When the trigger Type is set to 2, it will be triggered repeatedly. QUICK_EDIT
As that recruitment tutorial is for a bit advanced mappers, you have to read it multiple times. Autocreate doesn't mean to create teams automatically, that term is carried over from RA1. In RA2 it is related to recruit from pre-placed units or to build from factory.
But why does it not recruit the ones that were already built? For example, the trigger creates "Recuitable Units". Instead of getting unit from those units(after these units already finished they're scripts making them recruitable regardless of AreTeamMembersRecruitable=yes or not) it creates a new batch of "Recruitable Units". In comparison to Prebuild, it does just get the units from the one that were already created from the factory and finished their scripts.
E1 Elite wrote:
In general, a reserve/pool team should have AreTeamMembersRecruitable=yes and its Priority should be less than the team that will be recruiting.
This probably wouldn't matter since the team would be recruitable regardless after their scripts are finished.
E1 Elite wrote:
When the trigger Type is set to 2, it will be triggered repeatedly.
Meaning it would keep creating new batches if Autocreate was set? I'm confused with what Autocreate does. You say reserve pools with AreTeamMembersRecruitable=yes as if Autocreate will recruit them. But say setting the Trigger type to 2 will create a new team with exact number units mostly from the factory since the old team was completed and not recruitable even with their scripts finished. QUICK_EDIT
Autocreate= should be thought of as "build" as opposed to Reinforce= which just pops them into existence. Prebuild= is used for queuing a build before it gets triggered if there's nothing else going on, and will thus be ready for when the trigger fires, but is affected by other factors including other Prebuild teams.
Also worth noting that if you use script actions 11,x then they will be assigned a mission whereby they are no longer recruitable -- effectively they no longer follow the other rules you set for the team. So while "area guard" might be nice for your defensive teams, only the basic guard action 5,x will allow it, and guard is pretty ineffective as an actual "guard" if the units don't have OpportunityFire and related tags.
When same teamtype is produced again, it will not recruit from an active previous team as those will have the same Priority value. If the previous team would have finished its script, then those units become free units and those can be recruited.
Forget Autocreate and Prebuild in your case and set those to no.
Typically, reserve/pool teams are created using same units but with different teamtype having lower Priority value and AreTeamMembersRecruitable=yes. Those are put on guard or area guard with new mission 11,5 or 11,11 script actions. When attack team is formed whose teamtype have higher Priority value, it will recruit units from the pooled teams.
New mission scripts like 11,5 or 11,11 of guard or area guard allow to be recruited. Missions like sleep or harmless don't allow recruitment because such missions have Recruitable=no defineed in rules.ini. QUICK_EDIT
Also worth noting that if you use script actions 11,x then they will be assigned a mission whereby they are no longer recruitable -- effectively they no longer follow the other rules you set for the team. So while "area guard" might be nice for your defensive teams, only the basic guard action 5,x will allow it, and guard is pretty ineffective as an actual "guard" if the units don't have OpportunityFire and related tags.
Seems similar to my IFV guards on tech structures but mine is using script action 6. But this is noted. Also better than script action 6.
G-E wrote:
You may want to flip the UseMinDefenseRule in the map too.
This seems complicated. I don't know what this does yet and I'm tired currently but I'll check it later.
E1 Elite wrote:
When same teamtype is produced again, it will not recruit from an active previous team as those will have the same Priority value. If the previous team would have finished its script, then those units become free units and those can be recruited.
I see, but this wasn't an issue for prebuild but...
E1 Elite wrote:
Forget Autocreate and Prebuild in your case and set those to no.
How would they be created from the factory?
E1 Elite wrote:
Typically, reserve/pool teams are created using same units but with different teamtype having lower Priority value and AreTeamMembersRecruitable=yes.
They aren't the same since I'm trying to compress them. The reason why I'm trying to compress them was because they don't get to complete their mission and also would look a little awkward having the same units just clumped in one area.
Them not being able to complete the mission is no longer a problem. But it would still look awkward if the player see a clump of the same units.
E1 Elite wrote:
When attack team is formed whose teamtype have higher Priority value, it will recruit units from the pooled teams.
The priority value wasn't an issue with Prebuild. It seems to recruit them just fine with attack teams. Also doesn't create overflow creating similar teams with repeating trigger.
I'm only mentioning Prebuild because Prebuild, Autocreate, as well as Reinforce are the only things I know that allows building from a factory. I don't really know what I should set for building a unit in a factory QUICK_EDIT
first of all i just want to mention that it is weird for you to be using manual triggers instead of the AI triggers for this
mindefenserule, and the related tags, force the AI to always create defense teams before normal teams. it is used
only in the ai trigger system, and if you dont have enough basedef teams the AI will bug out and create nothing but
harvesters.
i really really recommend using the devoted AI trigger system instead. for the recruitment issues, its a little complex
but read up on the documentation like the one e1 made or the one i made here and pay
special attention to how to use recruiter=/recruitable= and the priority= system _________________ visit my moddb profile for .shp downloads and stuff QUICK_EDIT
Sorry, this is probably because I'm still learning more on triggers. AI triggers seems like its own section. I didn't know it my problem would be complicated enough to use AI Triggers.
I did know about AI Triggers. I was just trying to avoid it currently since:
1. It is new for me and I had to learn about it, which would pile up for other things I have to learn and overwhelm me and...
2. I assessed that Triggers are more important to understand since that is what gives the map more design.
If it is better to learn more about AI Triggers, then I'll put questions about Teams and stuff after I've gone through AI Triggers and still had issues with that.
I was always planning on using AI Triggers. I just didn't expect I would have to deal with it sooner than later.
I'll try and stick with asking questions about Triggers UNTIL I get to learning about AI Triggers. This is probably the end of the post. Thank you everyone for helping! And I'll get back to you if I have other question unrelated currently about Enemy base Teams. QUICK_EDIT
The danger with fiddling with Priority= is that high priority triggers can halt lower priority production. Effectively in the process of making team 1, it will switch production to team 2 before completing it, which can cause the AI to appear to pause all activity.
AI triggers are basically the same as a trigger using trigger action 4, except its automatic and has a more intuitive weight-based system
for creating teams. just make sure to disable the global ai triggers if its a mission map under basic, and make sure that some basedef teams
are there or the AI gets confused.
does high priority cause the AI to prefer building one team over another? i thought it was used exclusively for recruiting. i never had problems
with it, but then again i do make heavy use of pool teams so that almost all attack teams are entirely recruited from a pool instead of built. _________________ visit my moddb profile for .shp downloads and stuff QUICK_EDIT
Higher Priority doesn't mean it will have build preference over lower Priority team. It is recruitment Priority only, not production Priority. QUICK_EDIT
just make sure to disable the global ai triggers if its a mission map under basic, and make sure that some basedef teams
are there or the AI gets confused.
Ok thanks, I was about to create a new post about disabling global ai and I was messing with the AI triggers for a bit and it's pretty simple but I stopped when I couldn't stop the global ai/not getting my custom teams created as the AI is build GGIs. The global AI is giving me a headache and I kept changing things in AI Triggers
E1 Elite wrote:
Higher Priority doesn't mean it will have build preference over lower Priority team. It is recruitment Priority only, not production Priority.
Thanks for clarifying, I was thinking of mixing triggers and AI Triggers but it's good to know it doesn't bother production. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum