bombajack Posted June 26, 2015 Report Share Posted June 26, 2015 Exist any script for it? Thanks for answer. Link to comment Share on other sites More sharing options...
0 W4lly Posted June 26, 2015 Report Share Posted June 26, 2015 for change values ? or for detect? what to do this script? for detect watch statusbar script is a example... for change by condition is not difficoult... :) Link to comment Share on other sites More sharing options...
0 bombajack Posted June 26, 2015 Author Report Share Posted June 26, 2015 for change values ? or for detect? what to do this script? for detect watch statusbar script is a example... for change by condition is not difficoult... :) For change condition.For example: If you Hungry ,damage is -5 % per sec,for thirst same or more ..If you do not eat or thirst you'll die soon (like A2 DayZ style) Link to comment Share on other sites More sharing options...
0 W4lly Posted June 27, 2015 Report Share Posted June 27, 2015 if u know little bit code can make one ..... need to work with damage player EPOCH_playerHunger EPOCH_playerThirst EPOCH_playerStamina EPOCH_playerToxicity EPOCH_playerEnergy example while { true } do { waitUntil { myCondition }; _damage = damage player; if(_damage > 0) then{ _damage = _damage - 0.1; player setDamage _damage; }; if(_damage <= 0)exitWith {player setDamage 0;}; sleep 30; }; every 30 sec remove 10% of damage .. EPOCH_playerHunger and the others ned only to set EPOCH_playerHunger= value; Link to comment Share on other sites More sharing options...
0 bombajack Posted June 27, 2015 Author Report Share Posted June 27, 2015 if u know little bit code can make one ..... need to work with damage player EPOCH_playerHunger EPOCH_playerThirst EPOCH_playerStamina EPOCH_playerToxicity EPOCH_playerEnergy example while { true } do { waitUntil { myCondition }; _damage = damage player; if(_damage > 0) then{ _damage = _damage - 0.1; player setDamage _damage; }; if(_damage <= 0)exitWith {player setDamage 0;}; sleep 30; }; every 30 sec remove 10% of damage .. EPOCH_playerHunger and the others ned only to set EPOCH_playerHunger= value; Thank you for answer but im not coder..:/ I understand what is in code,but i can not write code..:) (if know what i say,my english is not good too) :D Link to comment Share on other sites More sharing options...
0 bombajack Posted June 27, 2015 Author Report Share Posted June 27, 2015 But i find this: hunger_fnc_handle = { if(hunger == 100) then { damage = damage + 10; hint "I need food!"; call hunger_fnc_handle; } else { hunger = hunger - 5; sleep 600; call hunger_fnc_handle; }; }; thirst_fnc_handle = { if(thirst == 100) then { damage = damage + 10; hint "I need drink!"; call thirst_fnc_handle; } else { thirst = thirst - 5; sleep 300; call thirst_fnc_handle; }; }; Can worked it? Link to comment Share on other sites More sharing options...
0 W4lly Posted June 28, 2015 Report Share Posted June 28, 2015 yea but .this isnt all script obviusly ....are only 2 functions... work if u have defined variables first referring to damage player, and all EPOCH player condition and values ... example values of damage is from 0 (ok) to 1 (dead) ..... damage +10 need to be converted... and damage need to be "player setDamage" or change nothing.... and need point where functions are called first time for start .. :) and if u understand whats in code can read code... if u can read can try to write .... dont bites :D :D :D Link to comment Share on other sites More sharing options...
0 W4lly Posted June 28, 2015 Report Share Posted June 28, 2015 writed this but i have not tested ... try... while { true } do { _damage = damage player; if(EPOCH_playerHunger < 100) then{ _damage = _damage + 0.1; if(_damage >= 1 )exitWith { player setDamage 1;}; player setDamage _damage; }else{ EPOCH_playerHunger = EPOCH_playerHunger - 50; }; if(EPOCH_playerThirst < 100) then{ _damage = _damage + 0.1; if(_damage >= 1 )exitWith { player setDamage 1;}; player setDamage _damage; }else{ EPOCH_playerThirst = EPOCH_playerThirst - 25; }; sleep 300; }; create file with name u want example myName.sqf put in mission folder.... in init.sqf put a line with [] execVM "myName.sqf"; need to be filtered for BE script.txt line 48 setDamage add !="player setDamage _damage;" !="player setDamage 1;" if u want increase speed reduce sleep.... Link to comment Share on other sites More sharing options...
0 bombajack Posted June 28, 2015 Author Report Share Posted June 28, 2015 writed this but i have not tested ... try... while { true } do { _damage = damage player; if(EPOCH_playerHunger < 100) then{ _damage = _damage + 0.1; if(_damage >= 1 )exitWith { player setDamage 1;}; player setDamage _damage; }else{ EPOCH_playerHunger = EPOCH_playerHunger - 50; }; if(EPOCH_playerThirst < 100) then{ _damage = _damage + 0.1; if(_damage >= 1 )exitWith { player setDamage 1;}; player setDamage _damage; }else{ EPOCH_playerThirst = EPOCH_playerThirst - 25; }; sleep 300; }; create file with name u want example myName.sqf put in mission folder.... in init.sqf put a line with [] execVM "myName.sqf"; need to be filtered for BE script.txt line 48 setDamage add !="player setDamage _damage;" !="player setDamage 1;" if u want increase speed reduce sleep.... Thx so much mate! I try it and give Feedback.. Link to comment Share on other sites More sharing options...
0 bombajack Posted June 28, 2015 Author Report Share Posted June 28, 2015 ITS WORKED! :) With permission i released it for other server admins. Thanks! ;) Link to comment Share on other sites More sharing options...
0 W4lly Posted June 29, 2015 Report Share Posted June 29, 2015 no problem ... :) Link to comment Share on other sites More sharing options...
0 Scorpi Posted June 30, 2015 Report Share Posted June 30, 2015 Is it possible to implement a chat message? :rolleyes: Link to comment Share on other sites More sharing options...
0 bombajack Posted June 30, 2015 Author Report Share Posted June 30, 2015 Yeah..try this: while { true } do { _damage = damage player; if(EPOCH_playerHunger < 200) then{ _damage = _damage + 0.1; systemchat("YOU ARE HUNGRY!EAT OR YOU DIE SOON"); if(_damage >= 1 )exitWith { player setDamage 1; }; player setDamage _damage; }else{ EPOCH_playerHunger = EPOCH_playerHunger - 50; }; if(EPOCH_playerThirst < 200) then{ _damage = _damage + 0.1; systemchat("YOU ARE THIRSTY!DRINK SOMETHING OR YOU DIE SOON!"); if(_damage >= 1 )exitWith { player setDamage 1; }; player setDamage _damage; }else{ EPOCH_playerThirst = EPOCH_playerThirst - 25; }; sleep 180; }; Link to comment Share on other sites More sharing options...
0 Scorpi Posted June 30, 2015 Report Share Posted June 30, 2015 Thanks! Link to comment Share on other sites More sharing options...
0 DirtySanchez Posted June 30, 2015 Report Share Posted June 30, 2015 Thanks! Scorpi he put this in a full release in the scripts forum. I made some quick changes to it yesterday and am about o make a few more changes too Link to comment Share on other sites More sharing options...