LeahTheUnknown Posted April 15, 2020 Author Share Posted April 15, 2020 ReDragon2013, this is awesome! Thank you for putting this much work into a response. The reason for the two custom events is they actually do two different things. 1. When the block (A) is released, script (A) sends a RequestData 'broadcast,' basically saying "I'm here, everyone send your data" and listens for SendData events.2. A nearby block (B) receives a RequestData event, its script (B) checks that event arguments to see if it is within the SearchRadius3. The nearby block's script (B) then sends a SendData 'broadcast' which (A) is listening for.4. Script (A) then adjusts block (A)'s position to 'snap' to block (B), like a lego. From what I can tell, your script attempts to fill an an array with PositionData as they are placed. As I understand, script (A) and script (B), despite both being _gkx_lagoblocks scripts, are two separate ScriptObjects. Therefore, an array filled within one of them will not affect the other one. To do it your way, the array would have to be on an external script, like a quest script, which will probably be the way I go with this by the time I'm done with this thing, as it would probably be faster and more reliable. The other option I'm considering is making the requesting and sending two separate scripts on each block. Thanks again for your help! Cheers!~GKX Link to comment Share on other sites More sharing options...
Recommended Posts