Jump to content
Wyqer

Small Scripts for ArmA 3 from KP

Recommended Posts

kp_banner.png

 

Small Scripts for ArmA 3 from KP

GitHub

 

Description

A small and for sure growing compilation of small scripts which can be used in any mission without any need to change anything in the missionfile. Only implementing in one of the init files and you're done. Configurations will be inside each script file seperately.

 

Currently contained scripts

  • KP Fuel Consumption Script
    This script handles the fuel consumption of vehicles, so that refueling will be necessary more often.
    It also checks if the vehicle is standing with running engine, driving in normal speed or max speed.
    With this script you'll have the need to refuel the vehicle during an evening session with a suitable setup by default (full configurable).
    So no more "never ending" fuel available due to the normal ArmA 3 fuel consumption mechanic.
  • KP Distance Monitor Script

    Adds actions to the player to start/stop/reset travelled map distance measuring.
    It will be shown as hint and you can configure the interval of the measuring.
    It works with a loop which you can leave via script command or debug console: kp_distance_run = false;

  • KP Load Loadouts to Cargo Script

    Ability to load items from saved or predefined loadouts to a vehicle cargo.

    This functionality is available in the vicinity of objects which you've defined per classname in the script or via this setVariable ["KP_loadout_cargo_object",1]; in an objects init line in the editor.
    To end the script on a client you've to run KP_loadout_cargo_run = false; on the clients machine.

  • KP Random Wreckspawn Script
    Place random wrecks on the roads of the map.
    You don't need to place anything in the editor or something.
    This script will place in a free configurable mininum and maximum distance random wrecks on the roads.
    Also with a adjustable chance to spawn more wrecks in the direct vicinity of the last spawned wreck, so it'll also create random roadblocks.

 

If you've suggestions or ideas for small scripts like that, let me know.

Mostly I'll add scripts there which are created due to our community needs and if they're usable as kind of "standalone" script.

 

You could also join our Discord:

KP Discord

  • Like 4

Share this post


Link to post
Share on other sites

Many thanks, foxhound.

Really glad that my small works are hosted on Armaholic.

Share this post


Link to post
Share on other sites

A script to measure how far a soldier has walked, for navigation purposes? An action to start and stop measuring for instance.

Share this post


Link to post
Share on other sites

Just per action like "start measuring" and "stop measuring" with a hint which show the walked distance after stopping?

Yeah, so that's really quite simple, sure.

 

Or of what behaviour did you think of?

Share this post


Link to post
Share on other sites

Yeah, a start measuring action and an onscreen hint with a distance in metres/km travelled. And because the hint is always on the player's screen, you can be reminded to clear/restart/stop. It may become a handy training tool to help players know what an actual in game distance is rather than a guess that is grossly incorrect. :tounge2:

Share this post


Link to post
Share on other sites

Before I go out I had to come in and say that you are a very talented scripter to get it done so quickly! have tried it out on flat ground and it works very well. Impressed. :thanx:

  • Like 1

Share this post


Link to post
Share on other sites

It's really not a hard script, so everyone who've done some ArmA scripting could've write this very fast. Really nothing special, but thanks :)

Glad that I could help you and create what you've wanted :)

 

Updated the first post with the script.

Share this post


Link to post
Share on other sites

Hi

A vehicle "loadout station" would be  cool..

i saw something like that on a server cant rember where.

for ex. lets say a predefined object or house etc.. as soon you get close enough you'll get a addaction "choose loadout" then a UI opens up where its possible to choose between At loadout , Medic loudout and or Ammo resupply..... or whatever .

u choose one a hint shows up "vehicle gets loaded" after 2mins another hint "done".

i know thats not a small script but very useful, especially would this be awesome on your liberation mission to load Gear stuff quickly in avehicle's. (by the way this Mission is one of the best out there :rthumb: )

 

Share this post


Link to post
Share on other sites

Sounds interesting, true.

So to get you right:

A Script which can load all items of a saved arsenal loadout to a vehicle?

 

Wouldn't be a really big script. I'll do that this evening. Really like that idea and additional to saved arsenal loadouts I would implement jut a small configuration, where admins can enter some kind of packages which can also be chosen.

  • Like 1

Share this post


Link to post
Share on other sites

at the moment I don't see an issue with loadouts which contains mod items.

I'll loook into that this evening and during the day tomorrow, as I've not that many time this evening.

Share this post


Link to post
Share on other sites
2 hours ago, Wyqer said:

Sounds interesting, true.

So to get you right:

A Script which can load all items of a saved arsenal loadout to a vehicle?

 

Wouldn't be a really big script. I'll do that this evening. Really like that idea and additional to saved arsenal loadouts I would implement jut a small configuration, where admins can enter some kind of packages which can also be chosen.

never thought about the Arsenal

more like predefined  loudouts in the script itself

for example AT loadout:

 

1x Javelin

5x Javelin Ammo

2x  MK153 Mod 0 SMAW

5x Heat ammo................

you get the idea

 

but arsenal works too

doesnt matter

i'am happy that you are thinking about it:icon_dj:

thx

 

 

 

 

Share this post


Link to post
Share on other sites

I'm half way done now with that.

Will finish it tomorrow.

 

It will work than with arsenal saved loadouts and also predefined loadouts inside the scriptfile config.

The actions to load the vehicle will be available at objects which classnames are written in the script config or got a variable attached via the editor (if you want only one specific box should give that action and not every box with that classname for example).

It won't have a UI. It'll work via mousewheel actions. Implementing a full UI for that wouldn't fit inside one script file, so it won't be something for this "script compilation".

Maybe later on I could provide something like that inside Liberation with an UI. But not for this compilation here.

Share this post


Link to post
Share on other sites

One thing I really miss from the old EOD mod are the "dickers"

 

Eg you have a car randomly parked by the road with an ACE compatible explosive attached, then within eyesight of the vehicle you have a "civilian" standing/sitting watching the car with a cellphone in his inventory.

 

If you searched the guy and took his cellphone (or killed him) you could approach the car safely without the explosive going off. 

However if you went near the vehicle without detaining him/taking the cellphone/killing him he would set off the explosive (satchel charge)

I've got no idea how easy/difficult that would be but it'd be great to see that feature back in the game. 

if it's outside the scope of your small scripts I totally get it, Thanks for all the work you've done on Liberation too by the way.  

 

Share this post


Link to post
Share on other sites

Would be a nice little script, that's true.

I'll put in on the list and will have a look into that.

  • Like 2

Share this post


Link to post
Share on other sites

@Hossus

Please try this script, if it fits your needs.

Informations are inside the script as comments.

Won't say more to it, to proof if the comments are enough to use the script :)

If it's what you thought about, I'll add it to the list above.

 

https://raw.githubusercontent.com/Wyqer/A3-Scripts/master/kp_load_loadout_cargo.sqf

Share this post


Link to post
Share on other sites

OK  first of all it is awesomeeee

 

i like that it's possible to choose between arsenal and loadouts in the script , i made a couple.

the way it works is fine with me.

u could make  option  if people want to clear the vehicle loadout or not before adding a new one.

 

also i could not make a placed house  ( ex.  _object_classnames = [
"Land_Ammostore2"];   )  

to work with the script

and i'm having problems to get it to work on liberation...........

 

but yeah thats what i was looking for so many thx

:icon_dj::thanx:

 

 

Share this post


Link to post
Share on other sites

Yeah, it won't work on buildings.

What a problem do you have with Liberation?

 

Updated the first post btw

Share this post


Link to post
Share on other sites

i added the ammobox to the build menu om Liberation

i only get the addaction "Open loading menu " after i restart the server

 

 

Share this post


Link to post
Share on other sites

Yes, that's a normal behaviour concerning the script.

in the \scripts\client\build\do_build.sqf

Line 315

Change

switch (_classname) do {
    case FOB_box_typename: {[_vehicle, 3000] remoteExec ["F_setMass",_vehicle];};
    case "Land_Medevac_house_V1_F";
    case "Land_Medevac_HQ_V1_F": {_vehicle setVariable ["ace_medical_isMedicalFacility", true, true];};
    case "Flag_White_F": {_vehicle setFlagTexture "res\kpflag.jpg";};
    case KP_liberation_small_storage_building;
    case KP_liberation_large_storage_building: {_vehicle setVariable ["KP_liberation_storage_type", 0, true];};
    default {};
};

to

switch (_classname) do {
    case FOB_box_typename: {[_vehicle, 3000] remoteExec ["F_setMass",_vehicle];};
    case "Land_Medevac_house_V1_F";
    case "Land_Medevac_HQ_V1_F": {_vehicle setVariable ["ace_medical_isMedicalFacility", true, true];};
    case "Flag_White_F": {_vehicle setFlagTexture "res\kpflag.jpg";};
    case Arsenal_typename: {KP_loadout_cargo_objects pushBack _vehicle; publicVariable "KP_loadout_cargo_objects";};
    case KP_liberation_small_storage_building;
    case KP_liberation_large_storage_building: {_vehicle setVariable ["KP_liberation_storage_type", 0, true];};
    default {};
};

 

Share this post


Link to post
Share on other sites

pushBack X   ? should be   pushBack "B_supplyCrate_F" ? or   pushBack  Arsenal_typename

I tried them all...

  but still dosen´t work

 

sorry i am not the best when it comes to scripting

 

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

×