Jump to content
  • 0

Humanity Variable


Vindomire

Question

i am coding a loadout script. I have it set up for custom loadouts but also i wanted to have it give people with no loadout humanity based random loadouts. So basically if your a survivor/hero/bandit/villain/superhero you can have loadout 1, 2 or 3. It is called from init.sqf at end of file:

if (dayzPlayerLogin2 select 2) then
{
    player spawn p2_newspawn;
    [] ExecVM "custom\loadouts.sqf";
};
in that file the custom load outs work but when it gets to polling humanity it just stops (mission is not reporting debug for some reason so i use system chats atm.

if ((player getVariable ["humanity",0] < 5000) && (player getVariable ["humanity",0] > -5000)) then {
	systemChat ("LOADOUT: Survivor Loadout");
 is where the file stops, no more system chats and no errors in rpt just stops.... it doesnt show that system chat either. (my humanity was 2500)
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

i was initially using a variable to hold humanity, But that line stopped the file.

_humanity = player getVariable["humanity",0]; was exactly what i had to get the variable. if i put a systemchat on either side of it it would never pass that line.

and sorry i have the block terminated but there was more code i just didnt show the terminated bracket.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...