Jump to content
itisnotlogical

Suicide bomber scripted sequence

Recommended Posts

Hello,

 

I'm trying to create a sequence where a convoy is halted after a bomber runs into the street and detonates an IED (conceptually, the explosion is spawned in script, there is no "real" explosive on the map.) However, I'm having a number of issues getting it to look natural.

 

I'm using simple Move waypoints to control both the bomber and the vehicles. If I activate the bomber too early, the "bomb" detonates way ahead of the vehicle and it just looks wrong. If I do it any later, the bomber and lead vehicle get stuck awkwardly trying to avoid each other and the whole thing is ruined. It's also hard to control the timing because sometimes the bomber decides to walk instead of run, or stands still for a bit before moving. Is there any way to force a unit to move directly to a spot without avoiding other units?

 

Below are the relevant scripts ("dead" is the convoy lead vehicle.)

 

bomber init:

this disableAI "MOVE";

bomber wp#0 MOVE condition:

dead distance bomber < 20;

bomber wp #0 MOVE onActivation:

deleteWaypoint [convoy, 0];
bomber enableAI "MOVE";

bomber wp #1 MOVE onActivation:

sat1 = "SatchelCharge_Remote_Ammo_Scripted" createVehicle position bomber;
sat1 setDamage 1;
sat2 = "SatchelCharge_Remote_Ammo_Scripted" createVehicle position dead;
sat2 setDamage 1;
deleteVehicle bomber;

 

Share this post


Link to post
Share on other sites

I noticed they’ll not try to go around things if they are in Combat mode.  They’ll just plow through most the time.  Could try that.  I’m sure you tried playing with the distance.  Could also try it with some AI modes turned off on the bomber (using ai mode module or something)so maybe he doesn’t pay attention to the vehicle and just runs out.  I’m not home or I’d test it. 

Share this post


Link to post
Share on other sites

You could also try https://community.bistudio.com/wiki/BIS_fnc_stalk

 

itll make the ai run directly towards them.  Set the first vehicle as the unit to stalk.  Was messing with it last night trying to make my own suicide bomber script. Looks like it has to be a group not object but I’m sure you can make it work if the first vehicle is closest to them

Share this post


Link to post
Share on other sites
1 hour ago, itisnotlogical said:

I decided to control the vehicles with https://community.bistudio.com/wiki/setDriveOnPath, but BIS_fnc_stalk seems a lot better than using standard waypoints for the bomber. Thank you for the assist!

I'll have to check that out, still learning myself.

Share this post


Link to post
Share on other sites

Does that setDriveOnPath make the convoys move together more realistic?  Let me know how that goes.

Share this post


Link to post
Share on other sites

Well, yes and no. It gives you a lot more control to decide exactly where the vehicles go, and at what speed. The downside is they will always drive in a straight line between points. That makes the driving very consistent, but it takes a lot of tweaking to i.e. move smoothly through a turn. It also seemed to have a problem if I defined more than nine waypoints, but I'm not sure if that's a problem with the game or myself.

 

It seems to me that an ideal use case would be to use waypoints across long distances or in sparsely-populated areas, then switch to setDriveOnPath when consistency is required and you want very specific movements.

I also tried https://community.bistudio.com/wiki/BIS_fnc_unitCapture as I saw suggested in a few other threads, but that just moved the vehicle along the ground without actually turning the wheels. It was very jittery and just looked wrong, as well as requiring several "takes" to get the inputs just right.

Share this post


Link to post
Share on other sites
11 minutes ago, itisnotlogical said:

Well, yes and no. It gives you a lot more control to decide exactly where the vehicles go, and at what speed. The downside is they will always drive in a straight line between points. That makes the driving very consistent, but it takes a lot of tweaking to i.e. move smoothly through a turn. It also seemed to have a problem if I defined more than nine waypoints, but I'm not sure if that's a problem with the game or myself.

 

It seems to me that an ideal use case would be to use waypoints across long distances or in sparsely-populated areas, then switch to setDriveOnPath when consistency is required and you want very specific movements.

I also tried https://community.bistudio.com/wiki/BIS_fnc_unitCapture as I saw suggested in a few other threads, but that just moved the vehicle along the ground without actually turning the wheels. It was very jittery and just looked wrong, as well as requiring several "takes" to get the inputs just right.

If you force the engine on  it's wheels spin during the playback, but yeah, it's def not smooth from my experience.  Tried a lot of different framerates with not a lot of good results.  It looks decent on air, but everything else looks kinda weird.  Tried it on infantry and he just kinda floated around with his knees bent up like he was jumping.

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

×