| 12-26-2003, 09:46 AM | #1 |
Many functions in common.ai use integer sleep_seconds. These include FormGroup and many Suicide functions. What's this integer for? I presume it has to do with attack waves, but can it cause some troubles for those who don't use them? E.g. I spotted that FormGroup has exitwhen that involves sleep_seconds, and SuicideSleep reduces its number. Any help appreciated. Cheers, Tommi |
| 12-26-2003, 11:35 AM | #2 |
It has something to do with timing attacks. I never fully investigated it as I removed it and replaced it with my own system. Well, I guess it is mostly thought for campaign AIs and their attack waves. |
| 12-26-2003, 12:36 PM | #3 |
Thanks, Andy. Did you also replace FormGroup functionality? |
| 12-26-2003, 06:00 PM | #4 |
I changed it a bit but I did not really change the underlying concept. |
| 12-27-2003, 11:20 AM | #5 |
I investigated sleep_seconds functionality more. It appears that sleep_seconds is used as a global variable for counting the total wait time in many functions. For example, CommonSleepUntilTargetDead uses it to reform the group every 40 seconds. SuicideSleep is the function that sleeps and reduces sleep_seconds at the same time. Cheers, Tommi |
