You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we get any feedback from BWAPI (e.g., via events, callback functions) that can notify the caller a failure has occured when a worker is trying to settle down a structure in a specific position?
For example, consider the following scenario.
The player issues a build command to a SCV with a target position to build a structure.
That position is far away from the current position of the assigned SCV, so the SCV has to move to the target position.
This may take some time.
After a while, the SCV reaches near by the target position, tries to settle down the structure.
However, at this point, it finds the target position has been occupied by other units.
As a result, the structure is not going to be constructed?
In this situcation, StarCraft will seed a feedback to a human player saying that the construction is not going to start.
Can we get a feedback as well from BWAPI within this situation?
The text was updated successfully, but these errors were encountered:
If in the same frame, there are multiple errors happening, I guess in this case some of those errors will be overwritten. Is that correct?
If I call getLastError() multiple times in the same frame, is it possible that I can get different error types?
For example, I issue a command to a unit (e.g., attack), and then I call this function immediately (next line of code) after I issue the command to a unit. Will the error code get updated in the same frame, if some error is expected to the command I just issued (e.g., the target of an attack command does not exist)?
The way lastError works is it gets set during a function call and does not change otherwise. If there would be multiple errors only the first is returned, i.e. not enough minerals for the frame that you called it on, not the frame that Starcraft processes the command. So a command can succeed in BWAPI but fail in Starcraft (no error feedback).
For example, I issue a command to a unit (e.g., attack), and then I call this function immediately (next line of code) after I issue the command to a unit. Will the error code get updated in the same frame, if some error is expected to the command I just issued (e.g., the target of an attack command does not exist)?
If there's a problem with the command BWAPI will return false and set lastError to something, then you can check it with getLastError. But if you successfully issued the command in BWAPI but the target disappeared (thus making it invalid) and it gave an error in Starcraft you wouldn't get any feedback.
Same with ordering a worker to construct something, if another unit runs in the way there's no way to get feedback from BWAPI specifically for that.
Can we get any feedback from BWAPI (e.g., via events, callback functions) that can notify the caller a failure has occured when a worker is trying to settle down a structure in a specific position?
For example, consider the following scenario.
The player issues a build command to a SCV with a target position to build a structure.
That position is far away from the current position of the assigned SCV, so the SCV has to move to the target position.
This may take some time.
After a while, the SCV reaches near by the target position, tries to settle down the structure.
However, at this point, it finds the target position has been occupied by other units.
As a result, the structure is not going to be constructed?
In this situcation, StarCraft will seed a feedback to a human player saying that the construction is not going to start.
Can we get a feedback as well from BWAPI within this situation?
The text was updated successfully, but these errors were encountered: