Jump to content
BlacKnightBK

Custom AI Creator (functions file)

Recommended Posts

 

 

 

Custom AI Creator

Hello developers, feeling good?? I hope the answer is yes and hope this functions file makes you feel even better :)

 

The sqf file linked below is a group of functions that would help you create AI’s with your own custom gear, the document is the instructions manual for those functions.

 

The Functions available in that file enable you to spawn a single AI with your own choice of gear, a whole squad, and even vehicles full with AIs. The best thing is when you decide to call one of those functions you can do it on one line, some functions all you need to do is give it the location and it will do the rest.

 

PS. You will need to spend some time setting the gear for each soldier type but don’t worry, there are detailed instructions.

 

I have made this file for my community's use but thought I should share it with all of you and please keep in mind, these are my first functions ever so I hope I get a lot of constructive feedback that would help me get better :D

 

LICENSE:

You are free to use the file as you wish as long as you keep the credits. You can edit the functions too as you wish however would appreciate letting me know if the changes you make would be useful to the rest of the community.

Re-uploading the file is not allowed without permission. I would like to keep tabs on file so when I feel it needs updating I can easily do it, however, you can re-share the link to the document freely since any changes made there will be seen by all.

 

Cheers


 

File Download

CHANGELOG

 

  • V 0.2 (01/04/2017)

    • Changed the switch in "YI_fnc_setAiLoadout" to if-else statements for faster code execution (Document updated as well).

    • Edited the "YI_fnc_squadCreator" to take allow you to choose a faction, default faction is still east though you can change the default easily from the function parameters yourself.

    • Edited the "SER_fnc_spawnVehicleSquads" to allow you to choose a faction, default faction is still east though you can change the default from the function's parameters yourself.

    • Edited the "SER_fnc_spawnVehicleSquads" to allow you whether or not you would like a spawned helicopter to spawn on ground or in air. (Default: Heli will spawn in air unless you specify otherwise)

    • Added the "forceAddUnifrom" command to the document this way all clothes can be worn by all factions.

    • Removed all private variables declaration due to them being useless lines of code 

  • V 0.1 (30/3/2017)

    • First Release

Other Releases

 

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Grumpy Old Man said:

Just a heads up, this is almost unreadable using the dark forum theme.

 

Cheers

 
 
 

had no idea there was a dark theme, after some googling I found it. Will edit the post :D

Share this post


Link to post
Share on other sites

Update the functions after getting some awesome feedback from Grumpy :)

 

If I was lucky and you already used my function earlier you do not need to worry, I have not edited any of them in a way that requires them to be called differently

.

  • V 0.2 (01/04/2017)

    • Changed the switch in "YI_fnc_setAiLoadout" to if statements for faster code execution (Error in Syntax, I have updated document regarding that error and will update file in next version).

    • Edited the "YI_fnc_squadCreator" to take allow you to choose a faction, default faction is still east though you can change the default easily from the function parameters yourself.

    • Edited the "SER_fnc_spawnVehicleSquads" to allow you to choose a faction, default faction is still east though you can change the default from the function's parameters yourself.

    • Edited the "SER_fnc_spawnVehicleSquads" to allow you whether or not you would like a spawned helicopter to spawn on ground or in air. (Default: Heli will spawn in air unless you specify otherwise)

    • Added the "forceAddUnifrom" command to the document this way all clothes can be worn by all factions.

    • Removed all private variables declaration due to them being useless lines of code 

Edited by BlacKnightBK
I changed text color to purple because it was said not to be visible on light theme, from now on no more copy paste

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

×