Call to Arms - Gates of Hell: Ostfront

Call to Arms - Gates of Hell: Ostfront

Gates of Hell Workshop
Craft your ideas via maps, missions and overhauls, then share them with the community! An endless array of posibilities and potential await your creativity!
Learn More
kapulA 1 11 Dec, 2023 @ 6:02am
Help with scripting random mutually exclusive attacks
Hi guys,
long time lurker, first time poster, just wondering what would be the best way to script 4 attacks, each from a separate direction (N, E, S, W) but in a way that eg it randomly decides the first one out of the 4 possible, then the 2nd one from the 3 remaining directions and so forth until all 4 are launched.
I know how to script it so they come in a set order and how to make them be fully random all 4 times, but the idea in my head is a bit more complex than that and I haven't got the inkling of how to script it in the most efficient manner.

All help greatly appreciated :)
< >
Showing 1-7 of 7 comments
Tjdagger 9 12 Dec, 2023 @ 2:47am 
Hi KapulA,
Do you basically have four groups of enemy "attackers", units/vehicles placed (N, E, S, W). On the map and tagged hidden?

If this is your unit setup, then I have a workable solution for you.

Also, when using scripting commands, such as "Entity_state".
Are you familiar with using "advanced" settings for the "source" when setting the "properties for Selector" ?
kapulA 1 12 Dec, 2023 @ 9:09am 
Thanks for the quick reply!
I was thinking of using a hidden pool of available units and cloning them, with different tags for groups of regular soldiers, MG gunners, squadleaders etc to get a random look for them with each playthrough since they'd all have numerous random variants. Are you saying it'd be easier if I created 4 hidden squads with the groups/squads system and have them ready at their respective spawns?

And yeah, I should be able to follow your instructions re using advanced settings for the selector.
If smth isn't clear I'll def rewatch some of your guides about the topic. :)
Tjdagger 9 13 Dec, 2023 @ 3:51am 
Originally posted by kapulA:
Thanks for the quick reply!
I was thinking of using a hidden pool of available units and cloning them, with different tags for groups of regular soldiers, MG gunners, squadleaders etc to get a random look for them with each playthrough since they'd all have numerous random variants. Are you saying it'd be easier if I created 4 hidden squads with the groups/squads system and have them ready at their respective spawns?

Yes, that would be the simplest solution. I'd simply assumed that was your current setup.

But, your extended vision of random squad members from a pool of available units is also possible.

I got this right ?...

Enemy attack from 1 of 4 directions. Randomly chosen. Next attack randomly comes from 1 of the 3 remaining directions, and so on and so fourth.

Each attack is made up of squads randomly selected from a pool of available units.

Each of the four possible directions have waypoint paths leading the attackers to the players defensive position. Presumably the player is based somewhere near the centre of the map?

An "Attack" ends when all current enemy are dead? This triggers the next attack to take place from a new random direction, with new random squads.
kapulA 1 13 Dec, 2023 @ 8:38am 
Hehe, it's a bit more complex.
It's actually just a one off script for each "attack", which is actually supposed to be a probe by enemy recon units, and the player will have to work his way to each location in the perimeter where they might be patrolling.
The task is basically a counter-recon patrol, so I'm thinking that the enemy recon teams will spawn prone and work their way to positions somewhere just a bit out of LOS of the defending units that are still AI-ally controlled at this point.
I wouldn't like to have one recon probe trigger the other, but rather have them all in the same script, with a randomised delay between the spawn of the recon groups, and the player would get notified with eg minute and a half/two minutes lag of when they reach their designated scouting zone, where they would spend approx 5 minutes or so and then proceed to crawl back offmap into a designated zone. This would make the task of finding and neutralizing the patrols more difficult as one might still be active when another one spawns in.
I was thinking of a having this referenced in a later script, so that if more than 1 guy from a particular group make it offmap, the preparatory arty barrage they were scouting for will fall on top of the defensive positions, and if just 1 or no guys are left from the group, then the arty will fall short and cause much less damage than the former case.
Tjdagger 9 26 Dec, 2023 @ 9:49pm 
Hey Mate,
I had a bit of time so I had a go at making a short video to hopefully help with the random stuff.

https://www.youtube.com/watch?v=wHt3_HKQTsI
Last edited by Tjdagger; 26 Dec, 2023 @ 9:49pm
kapulA 1 30 Dec, 2023 @ 5:00am 
Thanks a lot! And right on my birthday with the tutorial :D
Will look into it in the new year and I'll report how it works.
Tjdagger 9 30 Dec, 2023 @ 11:46am 
Happy Birthday and Happy New Year.
Cheers, Mate.
< >
Showing 1-7 of 7 comments
Per page: 1530 50