- Notifications
You must be signed in to change notification settings - Fork 130
Description
Prerequisites
- I have searched for similar issues and confirmed this is not a duplicate
Game Version
- Command & Conquer Generals
- Command & Conquer Generals: Zero Hour
- Other (please specify below)
Bug Description
Scripts can be set to evaluate at every given frame, or at a certain interval. See image:
This works perfectly if the box Script is Subroutine is unchecked. If it is checked, the script always evaluates every frame, even when explicitly set otherwise.
There isn't a real consensus on whether this behavior is a bug or not. It would be good to investigate first if this is intended behaviour.
Reproduction Steps
This test map will show the issue in action. In the map, the GLA AI opponent will build technicals and rebels. A counter will increment 1 every frame if it has at least one rebel. A different counter should increment 1 every second if it has at least one technical, but also increments every frame.
Open the map with ScriptDebugger to see what is going on.
Additional Context
This phenomenon is well known in the mapmaking/scripting corner of the community, and is generally avoided because of this inconsistent behavior. Adjusting this would make behaviors for the AI trivial that were previously tedious or downright impossible.
That being said, I wouldn't change this until after retail compatibility has been broken. This is a controversial change; not because of balance but because of potentially extreme implications this will have on any maps in the future (or existing maps). Before changing this, a discussion with the mapmaking/scripting community is needed.
I would flag this issue with the Controversial, Investigate, and DoLater labels in addition to the standard ones.