Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: GoodMorning on August 25, 2016, 10:48:39 PM

Title: GetEnemyUnitsInRange returned a Thor?
Post by: GoodMorning on August 25, 2016, 10:48:39 PM
Hello,

In this (http://knucklecracker.com/forums/index.php?topic=21125.0) map discussion, you can find a map where a straightforward (linear stage progression) script waits for GetEnemyUnitsInRange to find nothing but CRPL Cores.

However, you will see further down that someone had an issue where the script stalled. Reason? They had a Thor, and GetEnemyUnitsInRange was returning it.

Does anyone know why, or must I add a workaround for it forever after?
Title: Re: GetEnemyUnitsInRange returned a Thor?
Post by: Nicant on August 26, 2016, 06:59:48 AM
I tested this as well, i modified the wiki script to say "This is Thor" and it only said that when there was thors on the map. The script i used is below. Not sure how you can workaround anything, but it is a weird feature that is probably a bug.
Title: Re: GetEnemyUnitsInRange returned a Thor?
Post by: GoodMorning on August 26, 2016, 08:05:35 AM
One workaround would be:
GetUnitType "THOR" eq if ... endif