Author Topic: setBotType Event Fix  (Read 2753 times)

Currently(r1983) the setBotType event stores and saves the bot type as an object ID.
If you change the load order, or the datablock count, then the object it is trying to find, has a different ID.
The updated object ID is not reflected in any saved bricks, so upon loading a save with the setBotType event, the event will break.
This "fix" stores the bot type as an object "Name".  Which should remain the same between loads.
However, this "fix" adds minimal lag when you add any event, or open the event dialog box, as it has to check for the setBotType event and change the data it is submitting.

If this problem is ever fixed by an addition to the default game, please remove this add-on.
This add-on will not be automatically updated if Bot_Hole is updated.  Eventually, it will break something.

Download:
Mediafire - http://www.mediafire.com/download/sdv47a858m0a3dd/Script_setBotTypeFix.zip
Dropbox - https://www.dropbox.com/s/1yb17eih3aul0dp/Script_setBotTypeFix.zip?dl=0

tldr; Sometimes the setBotType event doesn't load right.  This add-on fixes that.

Cool, hopefully Badspot will fix the issue later on.

Just letting you know someone can spam the console with errors by doing:
/AddEvent

instead of getID() try nameToID(%id)

isObject should fix that.  But I added nametoID as well.

The old laptop I was using to test this went all bluescreen a few hours ago.  So I am unable to test it.  Or even put it in a zip file(I'm using ChromeOS atm).

Let me know if it works.
https://www.dropbox.com/s/5blln27rs2x2vup/botfix.cs?dl=0

glad you read my post and did some digging of your own, I would've done it but I'm having the same problem as you with the whole computers blowing up thing lmao.