Jump to content
Sign in to follow this  
dazza

(How to) create an ultra simple mod for AI "sneaking" movement

Recommended Posts

Hi all,

I am looking to make an ultra simple .pbo mod which I want to just throw into my addons folder, without having to constantly script something in my mission folder everytime.

The idea is simple. Everytime I spawn, I have two actions in my menu:

- SLOW APPROACH

- RETURN TO NORMAL

When clicking on the "SLOW APPROACH", my AI group members will (this setSpeedMode "LIMITED";). This means when I give them a movement command to go somewhere, they will sneak/move cautiously and slowly to the location - as oppose to jogging there (in vanilla).

I've already experimented with this by adding a couple triggers, assigning my group to setSpeedMode "LIMITED", and putting them in "stealth" or "aware" and I've noticed a huge improvement in the way they react to surprise 'contact' much better - as if they are more alert and ready for combat.

I have the concept down, which is "this setSpeedMode "LIMITED";" but unfortunately I don't know how to write a script that will immediately initiate whenever I start a mission, nor making it an option in my action menu, nor knowing how to compile it into a .pbo addon.

Can someone please help? Surely this cannot be too complex to make. All I need is some help coz I don't have any knowledge on how to make a .pbo.

Thank you so much to whomever can help.

Cheers!

Daz

Share this post


Link to post
Share on other sites

The answers to your questions are in the forums already. Well the config forums at least.

Search for "preinit" and "addAction" separately.

I'm not sure that you know what " ultra simple" means. ;)

So write your script in a mission and get it working as an addaction how you want it.

Then turn it into a function using cfgFunctions in a mission working how you want it to.

Then extract that and package it up as a pbo.

Share this post


Link to post
Share on other sites

Sweet! Thanks for pointing me in the right direction atleast. I'll give it a shot and report back if I am stuck with anything I don't understand.

Cheers!

Share this post


Link to post
Share on other sites

Sorry guys, I've tried to make my own .pbo addon but I am completely lost.

I managed to get as far as making sqf files (_playerGrp = Group player; _playerGrp setSpeedMode "LIMITED";) , and wrote in the player init "player addAction ["SLOW", "slow.sqf"]; player addAction ["NORMAL", "normal.sqf"]; and it works beautifully. However, now i am stuck as to how to get it to preinit without needing to write anything in the player init. And I am also stuck knowing how to make it into a pbo.

Aside from that though, Ive used the limited movement in afew test missions and it completely changed my group's survival rate in a firefight. My group would be able to move very tactically and slowly - and when coming in contact - can react immediately and directly. An absolute charm when clearing out urban environments. 9/10 times, my group would clear an entire compound - which had a squad of enemy - and survive without a single casualty. When getting them to move naturally in vanilla, my group would sustain an average of 4 out of 10 men dying.

Please help >.<

Thanks!

Share this post


Link to post
Share on other sites

All good now! :D so bloody happy I finally made it

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  

×