Help with a Problem

Relatively New Programmer Asking for help.

So I am making a Beginner “game” in processing where I’m to supposed reset a character’s timer when they collide with an enemy. Here is the code:

public void timer()
	newtime = millis()/1000; 
	text("Time Alive:" + newtime, 40, 90);	

Whenever I try to set newtime to zero, even at a specific life count, the timer does not reset. I even tried to do this with about 30 lines of code with if statements for each life count. Didn’t work. Any ideas?


Can we see a full code of what you have tried ? Specially how this function is used in your code.