Jump to content
Sign in to follow this  
frezinator

How to create a simple infantry ambush?

Recommended Posts

I'm trying to make an ambush scene where the enemy infantry squad will ambush us while we're driving on the road. How do you create infantry ambush?

Share this post


Link to post
Share on other sites

You know about the wiki? Look up arma editor commands and research setcombatstate. The group naming might take a moment or two to figure out.

But read up and then report back. You can do it all with setcombatstate in the init fields, setposition, dostop and area triggers where the enemies walk.

Share this post


Link to post
Share on other sites
See
.

Aaah thank you! Good tutorial vid!

---------- Post added at 14:12 ---------- Previous post was at 14:08 ----------

You know about the wiki? Look up arma editor commands and research setcombatstate. The group naming might take a moment or two to figure out.

But read up and then report back. You can do it all with setcombatstate in the init fields, setposition, dostop and area triggers where the enemies walk.

Wiki? I don't know what u talking about 0.0

Share this post


Link to post
Share on other sites

A simple (but not optimal) way is to place enemies on both sides of the road, giving each squad a very close (almost on top of them) "hold" waypoint with hold fire and stealth conditions. Then adding a second "move" waypoint with "open fire, fire at will", "combat" somewhere close to the road. Now create a trigger somewhere down the road (like 100m away from enemies) in the direction of your incoming units. Make the condition 'BLUFOR detected' (if your side is BLUFOR) and with enough width to intersect both sides of the road and then some. Now 'synchronize' every second ("move") waypoint to the trigger.

This way enemies won't fire on you right away, but will start offloading everything they got at you when you cross that 100m-away-from-them line i.e. ambush.

Of course there are better ways to do this, but for someone new to the editor I think this is a good way without diving into actual scripting.

Experiment with a distance of a trigger from enemies and the distance between first and second waypoints of each squad for best results.

Share this post


Link to post
Share on other sites
Wiki? I don't know what u talking about 0.0

There's the BI wiki. It contains most of the scripting commands and functions, along with examples. You may want to look into Mr. Murrays editing guide aswell. It's more suited for new scripters/coders, than the wiki. As the wiki can be vague and present terrible or no examples at all.

Share this post


Link to post
Share on other sites
A simple (but not optimal) way is to place enemies on both sides of the road, giving each squad a very close (almost on top of them) "hold" waypoint with hold fire and stealth conditions. Then adding a second "move" waypoint with "open fire, fire at will", "combat" somewhere close to the road. Now create a trigger somewhere down the road (like 100m away from enemies) in the direction of your incoming units. Make the condition 'BLUFOR detected' (if your side is BLUFOR) and with enough width to intersect both sides of the road and then some. Now 'synchronize' every second ("move") waypoint to the trigger.

This way enemies won't fire on you right away, but will start offloading everything they got at you when you cross that 100m-away-from-them line i.e. ambush.

Of course there are better ways to do this, but for someone new to the editor I think this is a good way without diving into actual scripting.

Thnx!!!! I've done some scripting but all i've done is just copy and paste >_< I don't know how to make a script. That's why I came to this forum asked for help.

---------- Post added at 14:23 ---------- Previous post was at 14:21 ----------

There's the BI wiki. It contains most of the scripting commands and functions, along with examples. You may want to look into Mr. Murrays editing guide aswell. It's more suited for new scripters/coders, than the wiki. As the wiki can be vague and present terrible or no examples at all.

Aah I see! I will try to explore BI wiki

Share this post


Link to post
Share on other sites

You could also useUPSMON. The script has a demo that comes with. In this demo you will see a guerilla team run to road, plant mines then run back to cover and wait for ambush. You can then use the demo to understand how it was done, very simply.

Edited by PlacidPaul

Share this post


Link to post
Share on other sites
You could also useUPSMON. The script has a demo that comes with. In this demo you will see a guerilla team run to road, plant mines then run back to cover and wait for ambush. You can then use the demo to understand how it was done, very simply.

Ooo nice! I will try the urban patrol script

Share this post


Link to post
Share on other sites
GL4 is also a good AI mod, but it doesnt have the option for creating ambushes.

GL4 is awesome too. DAC aswell.

Share this post


Link to post
Share on other sites

another good option for creating an ambush(a little more advanced but more dynamic),look up BIS_fnc_spawnGroup and use that to create group, then in the activation of the trigger, or somewhere in a script

waitUntil {sleep5;triggerActivated _trigger};//_trigger = the trigger you created in game(give it a name in the editor)
group = [getPos(nearestBuilding _unit), east, character details, relative positions, list of ranks, skill range, ammo count range, randomization controls, azimuth] call BIS_fnc_spawnGroup;
group setBehaviour "COMBAT";
group setCombatMode "YELLOW";

the above is scripted, in a trigger it would just be

group = [] call BIS_fnc_spawnGroup and you'd use a defined position or another function to create the position in which they're spawned

also you need to have the function module on the map(thanks for reminding me horner lol)

atleast I believe thats how a little snippet could be used someone could probably make it more dynamic/efficient.

Edited by jakkob4682

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×