SuicideSleep is almost the same as regular Sleep, but it also reduces the global integer sleep_seconds by the amount of time waited, plus it has some other minor things. sleep_seconds and SuicideSleep are both defined in common.ai:
I dont understand why it is called suicide, and why is it always used with attack functions, the global variable is only rarely used and I never saw it to set to 0, so it is always less and less. What's the deeper meaning of this?
Well, I think it has something to do with the feature of "waiting a set amount of time until the next attack wave begins." This is implemented in the AI editor and is supposedly is used in "defend for x minutes" type missions.
I haven't found much use for it in custom scripted AIs.