|
Post by Buzz Carols on Apr 20, 2013 20:16:30 GMT
My son, Buzzmusic, put some custom code in his level that makes the marble go extremely fast. It worked on both of our Macs. But for some reason, it won't work on Windows (two forum members tested it for us and it didn't work for either of them). Buzzmusic added these two lines at the bottom of the file, as you can see.
defaultmarble.maxRollVelocity = 30; defaultmarble.angularAcceleration = 10000000; //--- OBJECT WRITE END ---
Is there a compatibility issue between OSs? Any help would be appreciated.
|
|
|
Post by IsraeliRD on Apr 21, 2013 9:54:02 GMT
add below object write end, and test again
however it may be better to create specific datablocks and stuff, could work better. Also needs then to make function to cleanup code so other levels don't get affected by it. ill let jeff/higuy fill the blanks.
|
|
|
Post by Jeff on Apr 21, 2013 14:15:12 GMT
If they tested it in mbp, it won't work as the way spy47 programmed it, each marble has a different datablock object (defaultmarble being the object in your case.) To fix this, put this code after object write end: function doBuzzmusic() { cancel($BuzzMusic); if (isObject(localClientConnection)) { if (isObject(LocalClientConnection.player)) { localClientconnection.player.getDataBlock().maxRollVelocity = 30; localClientconnection.player.getDataBlock().angularAcceleration = 10000000; return; } } $BuzzMusic = schedule(50, 0, doBuzzmusic); } doBuzzMusic(); To explain what that does, every fifty milliseconds, the game checks to see if the marble exists in game. if it does, we are 100% sure that the datablock exists as the marble needs it upon creation. Once that is one, we just set the datablock properties, and stop execution upon completion of the code. Because "LocalClientConnection" object is destroyed upon exiting, it is a 100% chance that this code will not carry over to other levels. You should be good to go, if you have any problems, post here ~Jeff
|
|
|
Post by Buzz Carols on Apr 21, 2013 14:31:57 GMT
"It worked perfectly for me (on my Mac)! Now, I'll send it to Blasted Marble for Windows testing. Thanks so much!" - Buzzmusic
|
|
|
Post by Jeff on Apr 21, 2013 15:00:05 GMT
You're welcome. Please make sure either you / him posts here so that we know once you get the results.
Thanks,
Jeff
|
|