I have no doubt this question has been asked before, and I also have no doubt that someone will point me to an existing tutorial or doc, but I have searched and tried, I even thought a section of the basic ghost shooter tutorial would be the answer, but its not.
Basically, I want a sprite (TARGET) to have no collision, and when another sprite (CURSOR) crosses or otherwise touches it (moved using the mouse), it will become solid and change colour for 5 seconds, before reverting to normal.
I have tried the following events, after adding a private variable (TIMER) to the TARGET with a value of 0:
on collision between CURSOR and TARGET, TARGET: set TIMER to 5*TimeDelta
TARGET value TIMER greater or equal 1*TimeDelta, system TARGET add attribute 'solid'. Target subtract TimeDelta from TIMER
TARGET value TIMER less than 1*TimeDelta, system TARGET remove attribute 'solid'
When I run, the TARGET will become solid, but it stays solid permanently.
I'm not a noob to design, but coding and similar logic isnt my strong point. Id appreciate help