Jump to content

Recommended Posts

2 minutes ago, RZNUNKWN said:

"HIT scalar NaNm"

 

Have you delete the ?

_distance = _killer distance2D _killed;

if yes copy this again.

  • Thanks 1

Share this post


Link to post
Share on other sites

It works now, and it was so simple. I'm really bad at this. 🤦‍♂️

Thanks, GF!

  • Haha 1

Share this post


Link to post
Share on other sites
On 3/3/2019 at 9:03 AM, RZNUNKWN said:

Thanks, GF!

 

I forgot to tell you , that there is this also if you want to check :

 

 

This is a money killing reward according to the distance , with a simple notification added.

 

  • Like 1

Share this post


Link to post
Share on other sites

I'm prty new to scripting but I may be retarded too, can't find a way to add the possibility thing

Can't add this

//________________    add _possibility    ________________

_possibility            = random 10 < 3;

if (_possibility) then {
	<code>
	};

to this

//________________ Drop items ________________			
			
			_Drop_items = "groundWeaponHolder" createVehicle (getpos _unit);
			
			_Drop_items addItemCargoGlobal [(selectRandom[
			
			//________________ Ravage_items ________________
			"rvg_money", 
			"rvg_money",
			"rvg_money",			
			"rvg_spirit", 
			"rvg_franta",
			"rvg_beans", 
			"rvg_bacon", 			
			"rvg_rustyCanEmpty",
			"rvg_beansEmpty",
			"rvg_baconEmpty",
			"rvg_spiritEmpty",
			"rvg_frantaEmpty",
			"rvg_plasticBottleEmpty"
	
			]), 1];	//	select the amount of the items
	};
}];

I'd appreciate if you could explain like I'm 5. ty

  • Like 1

Share this post


Link to post
Share on other sites

Hello there GreenXp !

 

So first of all ,

are you using any kind of editing ( .sqf) program ?

Share this post


Link to post
Share on other sites
1 minute ago, GEORGE FLOROS GR said:

Hello there GreenXp !

 

So first of all ,

are you using any kind of editing ( .sqf) program ?

Notepad++

  • Like 1

Share this post


Link to post
Share on other sites

There is also highlighting for the sqf , the link is in the front page.

 

There are the options (settings) that you can set , to true or false and if you follow ( click to find ) what you want ,

 

ex.  _12_Drop_Items

 

//________________	Drop Items	________________			


if (_12_Drop_Items) then {	

if (_Systemchat_Enabled) then {
systemchat "_12_Drop_Items";
};
			

//_Drop_Items = "groundWeaponHolder" createVehicle (getpos _unit);
						
_Drop_Items_Amount =   round (1 + random 1);
_Drop_Items = "WeaponHolderSimulated" createVehicle (getpos _unit); 

//	OR add rarity 
//	if (floor (random 20) < 2) then {	the code below here	};

_Drop_Items addItemCargoGlobal [_addItemCargoGlobal_Array_1, _Drop_Items_Amount];
			
};			

 

i have already an exaple how to add a possibility to the code:

 

//    OR add rarity
//    if (floor (random 20) < 2) then {    the code below here    };

 

and this line here :

 

_Drop_Items addItemCargoGlobal [_addItemCargoGlobal_Array_1, _Drop_Items_Amount];

 

that is says , what will be the selected item ( the array that will be a random item selected )

_addItemCargoGlobal_Array_1

 

and the amount of the item

_Drop_Items_Amount

 

Then if you want the items to be from the certain default or your custom array also , then you need to add the certain array name (local variable ) there.

If you check what the _addItemCargoGlobal_Array_1 is , you will notice that it contains multiple arrays , which are selected on random :

 

//________________	Add random items in containers ( uniform , vest and backpack )	________________
//________________	You can adjust here the arrays
_addItemCargoGlobal_Array_1 = selectRandom[	

	_sideweapons_loot,
	_weapons_Loot,
	
	_magazineClass_sideweapon,
	_magazineClass_weapon,
	
	_items_loot1,
	_items_loot2,
	_items_loot3,
	_Clothes_array,
	_Vests_array,
	_Backpacks_array,
	
	_Ravage_items
];	

 

So , instead of using the _addItemCargoGlobal_Array_1 you can add the _Ravage_items included array , in the code above.

 

Finally , this example will look like :

 

if (_12_Drop_Items) then {	

if (_Systemchat_Enabled) then {
systemchat "_12_Drop_Items";
};
			

//_Drop_Items = "groundWeaponHolder" createVehicle (getpos _unit);
						
_Drop_Items_Amount =   round (1 + random 1);
_Drop_Items = "WeaponHolderSimulated" createVehicle (getpos _unit); 

if (random 10 < 2) then {    

	//	the code below here
	_Drop_Items addItemCargoGlobal [_Ravage_items, _Drop_Items_Amount];
 };
			
};	

 

  • Thanks 1

Share this post


Link to post
Share on other sites

As it turns out I'm too retarded and couldn't figure it out after hours so I ended up doing this (added spaces between items, as it is right now it looks like it's a 1 to 3 ratio but sometimes more), I'm surprised it works but I'm happy with it and I'm done messing with scripts I'm too retarded for them.

//________________ Enemies , will drop items or add to their inventory , when killed , configurable ________________

addMissionEventHandler ["EntityKilled", 
{
	params ["_killed", "_killer"];	
	if (_killed isKindOf "CAManBase"  

//________________ you can select to enable the script with the side of the killed persons ________________	

	
	&& {(	
		(side group _killed) == east || 
		(side group _killed) == independent ||		
		(side group _killed) == west)	
		}

		
		) then
	{
	//systemChat format ["killed"];
	
//________________ notification ________________	
//	[[
//		["Killed","align = 'center' size = '1' font='PuristaBold'","#FBFCFE"]
//	]]spawn BIS_fnc_typeText2;
	
			_unit = _this select 0;

//________________  add to their inventory ________________	
			
			//you can add a vest (when killed!)
//			_unit addVest				"";

			
			//you can add a weapon (on random)
//			_PrimaryWeapon = selectRandom [
			//LightMachineGuns
//			""
//			];
			
//			_unit addWeaponGlobal		_PrimaryWeapon;

			//you can add a certain weapon
			//_unit addWeaponGlobal			"";
			
			//you can attachment of the weapon
//			_unit addPrimaryWeaponItem	"";
			
//			_uniform	= uniformContainer _unit;
//			_vest		= vestContainer _unit;
			
			//add to their inventory
//			_unit linkItem "";
			
			//add in their uniform
//			_uniform addMagazineCargoGlobal ["", 0];
//			_uniform addItemCargoGlobal		["", 0];			
			
			//add in their vest
//			_vest addMagazineCargoGlobal ["", 0];

			
//________________ Drop items ________________			
			
			_Drop_items = "groundWeaponHolder" createVehicle (getpos _unit);
			
			_Drop_items addItemCargoGlobal [(selectRandom[
			
			
			
			//________________ Ravage_items ________________
			"rvg_money",
			"",			
			"rvg_money",
			"",
			"",
			"rvg_money",
			"", 
			"rvg_money",
			"",
			"rvg_money",
			"", 
			"rvg_money",
			"",
			"rvg_money",
			"", 
			"rvg_money",
			"",
			"rvg_money",
			"", 
			"rvg_money",
			"",
			"",
			"rvg_money",
			"",			
			"rvg_money",
			"",
			"",
			"rvg_money",
			"", 
			"rvg_money",
			"",
			"rvg_money",
			"", 
			"rvg_money",
			"",
			"",
			"rvg_money",
			"",
			"rvg_money",
			"", 
			"rvg_money",
			"",			
			"rvg_spirit",
            "",			
			"rvg_franta",
			"",
			"",
			"rvg_beans", 
			"",
			"rvg_bacon",
            "", 			
			"rvg_rustyCanEmpty",
			"",
			"rvg_beansEmpty",
			"",
			"rvg_baconEmpty",
			"",
			"rvg_spiritEmpty",
			"",
			"rvg_frantaEmpty",
			"",
			"rvg_plasticBottleEmpty"
	
			]), 1];	//	select the amount of the items
	};
}];

 

Share this post


Link to post
Share on other sites

You could as i told you ,

just set in the settings , anything that you didn't like to false , instead of starting deleting lines and messing without needed nd wasting time and this is why i gave you the certain example complete , just to copy paste from the topic.

Share this post


Link to post
Share on other sites
8 hours ago, GEORGE FLOROS GR said:

You could as i told you ,

just set in the settings , anything that you didn't like to false , instead of starting deleting lines and messing without needed nd wasting time and this is why i gave you the certain example complete , just to copy paste from the topic.

I did copy paste that but it wouldn't work and I don't know where to put the items that I want to spawn too, I told you I'm too retarded for this shit.

Share this post


Link to post
Share on other sites
10 minutes ago, GreenXp said:

where to put the items that I want to spawn

 

You can select any array and modify this or even make your custom.

So else if you are ok with your edit , then since it's working it's fine.

Share this post


Link to post
Share on other sites

just check the selectrandom if you want :

https://community.bistudio.com/wiki/selectRandom

 

you don't need even with this code to add all this code , just :

 

_Ravage_items = selectRandom [

	"rvg_money",
	"rvg_money",
	"rvg_money",
	"rvg_money",
	"rvg_franta",
	"rvg_beans", 
	"rvg_bacon",		
	"rvg_rustyCanEmpty",
	"rvg_beansEmpty",
	"rvg_baconEmpty",
	"rvg_spiritEmpty",
	"rvg_frantaEmpty",
	"rvg_plasticBottleEmpty"
	];


_Items_Amount = 1 + random 1;
_Drop_Items = "WeaponHolderSimulated" createVehicle (getpos _unit); 

if (random 9 < 3) then {    //	add the possibility here

	_Drop_Items addItemCargoGlobal [_Ravage_items, _Items_Amount];
};

 

Share this post


Link to post
Share on other sites

hi, im a bit late to the party 😜

 

-Big thx for this work!-

 

i tried your script with exile + ravage (ravage ai+zombies), i can see the system messages and the "hit" popup is working too but i cant get the cleaninventory thing get to work.

 

first of what i want to do. i want to play ravage+vd apocalypse+base building and some QoL and immersion stuff. but im too *tupid to get a dedicated server for that going especialy the basebuilding persistency database thing.

 

so what im trying to do is use exilemod instead and use the ravage ai and zombie ai. the problem is the ravage ai spawns in with all their ravage gear and consumables etc.

 

i want to delete only their ravage stuff. what i tried so far.

 

1. your blacklist script, when i try that. the hole script doesnt work anymore.

2. try to cleanup theri inventory. but that doesnt work too.

3. try to spawn/override their equipment once they´re dead. but i cant get the faction module then to work. zombies will drop loot then too.

 

im confused and tired i only want to play on a private server with a friend 😕 please help 

Share this post


Link to post
Share on other sites
On 8/2/2022 at 7:04 PM, Erkl said:

hi, im a bit late to the party 😜

 

-Big thx for this work!-

 

i tried your script with exile + ravage (ravage ai+zombies), i can see the system messages and the "hit" popup is working too but i cant get the cleaninventory thing get to work.

 

first of what i want to do. i want to play ravage+vd apocalypse+base building and some QoL and immersion stuff. but im too *tupid to get a dedicated server for that going especialy the basebuilding persistency database thing.

 

so what im trying to do is use exilemod instead and use the ravage ai and zombie ai. the problem is the ravage ai spawns in with all their ravage gear and consumables etc.

 

i want to delete only their ravage stuff. what i tried so far.

 

1. your blacklist script, when i try that. the hole script doesnt work anymore.

2. try to cleanup theri inventory. but that doesnt work too.

3. try to spawn/override their equipment once they´re dead. but i cant get the faction module then to work. zombies will drop loot then too.

 

im confused and tired i only want to play on a private server with a friend 😕 please help 

Hi Erkl
you are going to wait for a long time if you want George to answer you, he has not been on since September 18, 2020 due to some illness, but you only hope someone else will help you..

Share this post


Link to post
Share on other sites

Best to ask @kodabar @haleks or EO which for some reason his name wont come up on the list.

his questions might have already been answered on the Ravage thread.

 

Ya George hasn't been here in almost 2yrs now 😖 his situation might have turned dire

i dont want to say that but, considering he said in 2019 he had a form of cancer which he said he

was doing ok with or has taken care of, then this covid crap in 2020 we cant say for sure what happened.

     If anything the best, but hes not here, please surprise us George!

  • Like 2

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

×