[Question]

Bungle

Member
Hi Again,

Another one to all the clever coders out there..

Back to the mission.sqm and Sensors

Would there be a way to add in a script that runs to start lowing a players humanity to a capped level whilst inside a Sensor Area? I was hoping to have "No Go Zones" for villages I am developing to addin to epoch and would like to know if this is possible.

The reason is that I hope soon to have AI Guards patrolling the Village shooting at bandits, that threaten the trading bambies. :p

Ergo, If you go in these zones you will become a bandit and then you will get shot eventually.. how far can you make it!

If this is possible and anyone is willing to help develop it please let me know.

Thanks,

Mr Bungle
 
Code:
_lowHumanity = 500;
_targetPHumanity = _targetPlayer getVariable ["humanity",0];
while {_targetPHumanity > _lowHumanity} do {
_tempVal = _targetPHumanity;
_tempVal = _tempVal - 100;
_targetPlayer setVariable ["humanity",_tempVal,true];
sleep 5;
_targetPHumanity = _targetPlayer getVariable ["humanity",0];
};
quick and dirty, but it should get the job done. Simply takes a targetPlayer variable, decreases their humanity until it's 400.
 
Back
Top