At the bottom of the page is a link to the Beginner's Guide.
You need 'await' in front.
await sdk.GetImagePixelData().then(a=>
The background colour is on the Layer.
In Settings, make sure you have "Use simplified user interface" turned off.
Dark.
Copy:
-> Enemies: Set LastShockerUID to ShockerProjectile.UID
to the 'On collision' event also.
You need to get rid of the first code, it isn't what you want. Otherwise you'd have to post the project, as it isn't obvious what the problem is.
You just need to find the closest non-hit enemy then.
http://www.blackhornettechnologies.com/Construct3Stuff/Samples/DistanceBounce.zip
Develop games in your browser. Powerful, performant & highly capable.
You'd have to post your code at this point.
Drag the enemies around to see them check if distance is within 200 pixels. The example will just draw lines both ways as there is no optimization to check if a line exists already, but you get the idea.
http://www.blackhornettechnologies.com/Construct3Stuff/Samples/DistanceWithinFamily.zip
There's various ways of doing this. Cache the first coordinates, and compare those to the other enemies, or have a second enemy family, so you have two unique objects to check.
You provide the points of the two objects you are checking.
if( distance(Enemy1.X, Enemy1.Y, Enemy2.X, Enemy2.Y) < 50) do something.
Use the distance() expression.
construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions
It's in the original post.