Jump to content
Sign in to follow this  
Alpine_gremlin

[SOLVED] Only Show Message Once

Recommended Posts

Hey guys I am writing a simple test script to simulate slowly freezing to death. I want a systemChat message to alert the player of this, but I can`t get it to only appear a single time within the context of the while...do loop.

 

while {true} do {

	sleep 1;
	
	_syschat = 0;

	player setDamage (damage player + 0.025);
	
	if (_syschat == 0) then {
	
	systemChat "You are freezing! You must find shelter immediately!";
	
	};
	
	_syschat = (_syschat + 1);
		
	hint format ["Damage: %1", damage player];
	
	sleep 5;
	
};
	

Could someone point out the problem with my structure? Cheers!

 

EDIT: I`m just dumb. Please disregard this :/

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
Sign in to follow this  

×