I'm trying to create an enemy behavior where the enemy will freeze momentarily if they are hit by one of the player's bullets.
Though setting the enemy's "timescale" to 0 works to some degree, I have run into a major unforseen issue due to how my enemy is set up. The enemy's behavior involves waiting for a couple of seconds, firing a bullet, then firing a second bullet, and then restarting the process. Simple enough. To accomplish this, I'm using the System command "wait" to determine the amount of time between enemy actions. (seen below)
<img src="http://i1306.photobucket.com/albums/s571/Matt_Dabrowski/enemy_zpsfe1d9b64.png" border="0" />
The problem is this: Setting the enemy's timescale to 0 does not pause these specific System Waits. So if there is a wait of 2 seconds and I shoot the enemy at 0.5 seconds, this Wait will continue to count even though the enemy is supposed to be frozen. So once the enemy is unfrozen, their next action will occur immediately instead of 1.5 seconds later.
I'm going to attempt my own solutions and I'll post here if I come up with something that works really well. It may just involve completely changing the way I write enemy behaviors (maybe it's not a good idea to be using Waits for this sort of thing). But I'm curious as to how other people have dealt with these sorts of timing issues.