Jump to content
  • 0

Debug monitor


Darihon

Question

Hello,

 

So I started to learn the Arma coding a bit and I started off very easy, but I'm trying to challenge myself like I always do. I want to have something like this:

 

If the humanity is higher then 5000, i want to say it Hero.

if the humanity is lower then 0, i want to say it Bandit.

If humanity is between that, i want it so say Survivor.

 

This is what I tried:

if (_humanity > 5000) then { 
%6 (declared if you check the code below) = "Hero";
};
if (_humanity < 0) then {
%6 = "Bandit";
};
else {
%6 = "Survivor";
};

This is how far I am:

_name = dayz_playerName;
_survived = dayz_Survived;
_blood = r_player_blood;
_murder = player getVariable["humanKills",0];
_bandit = player getVariable["banditKills",0];
_humanity = player getVariable["humanity",0];
 
 
hintSilent parseText format ["
<t size='1.10' font='Bitstream' align='center' color=''>Welcome, %1</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Survived: %2 days</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Blood: %3</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Murders: %4</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Bandit Kills: %5</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Humanity: %6</t><br/>
 
 
",
_name,
_survived,
_blood,
_murder,
_bandit,
_humanity
];
Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Just did this from memory, so not sure it will work. But I'm on the right track ;)
 

_name = dayz_playerName;
_survived = dayz_Survived;
_blood = r_player_blood;
_murder = player getVariable["humanKills",0];
_bandit = player getVariable["banditKills",0];
_humanity = player getVariable["humanity",0];

if (_humanity > 5000) then {
_anothervalue = "Hero";
} else {
if (_humanity < 0) then {
_anothervalue = "Bandit";
} else {
_anothervalue = "Survivor";
};
 
hintSilent parseText format ["
<t size='1.10' font='Bitstream' align='center' color=''>Welcome, %1</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Survived: %2 days</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Blood: %3</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Murders: %4</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Bandit Kills: %5</t><br/>
<t size='0.90' font='Bitstream' align='center' color=''>Humanity: %7</t><br/>
 
 
",
_name,
_survived,
_blood,
_murder,
_bandit,
_humanity,
_anothervalue // Becomes %7
];
Link to comment
Share on other sites

  • 0

Doesn't work either. 

 

I got something to work with this code, but it says: "Side: any"

 

if (player getVariable["humanity",0] > 5000) then {
_anothervalue = "Hero";
};
if (player getVariable["humanity",0] < 0) then {
_anothervalue = "Bandit";
};
Link to comment
Share on other sites

  • 0

Not familiar with ARMA code but I know other launguages, this MAY work.

Reason beaing if humanity is not more than 4999 it must be below, therefore making you a bandit.

It may even work with if (player getVariable["humanity",0] => 5000 then{

 

But as I said not familiar with ARMA so going off my knowledge of other languages.

if (player getVariable["humanity",0] > 4999) then {
_anothervalue = "Hero";
}; else {
_anothervalue = "Bandit";
};
Link to comment
Share on other sites

  • 0

Darryl, as understood you have this script in mission.pbo right? If yes then you need set variable on up document.

Example:

private ["_checkinghumanity"];
_checkinghumanity=""; 

if (condition) then{
_checkinghumanity="Hero"; 
} else {
_checkinghumanity="Bandit"; 
};

Link to comment
Share on other sites

  • 0

You edit playerstats.sqf right? If yes, then copy it and put to mission.pbo in folder fixes.

Edit your compiles.sqf for change directions playerstats.sqf on this playerstats.sqf in Fixes folder from Mission.pbo.

I noticed files with new content in the form new code/loops is ignored in dayz_code.pbo

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...