Hey boxers, Does anyone know if there's the newest API reference for Buildbox 3? This seems to be an old one: http://download.buildbox.com/buildbox/assets/documentation/api-3.0.0.2250.html (from Buildbox 3.0.0, #2250). Not all functions are there. ... @Sean Buildbox We seem to have: -> this.scene().totalPoints() -> this.scene().decreaseTotalPoints(amount); But do we have totalCoins() and decreaseTotalCoins? Something is off and I cannot make it work with Coins. @Skyhub Games -> can this be used for the Character System you have made? I can't make it work with Coins. I have a sufficient amount of coins, but when attempt to unlock the character, it says, "No Coins." I have changed totalPoints to totalCoins and decreaseTotalPoints() to decreaseTotalCoins(), but not sure if that's in the API for Buildbox Thoughts? It works however, if I purchase a Coin Pack and attempt to unlock. But cannot unlock with collected coins in the game. I feel like it unlocks with Session Coins, not with Total Coins -> maybe that's a Buildbox 3 bug? Thanks, Itzo
@itzonator You can use: let obj = this.entity() for(m in obj) log(m); This will list all functions of an object in JS + You can use like this.entity(), this.scene(), this.camera() and etc etc etc If the api isn't updates. This is the best way to get knowledge if you code
For your question. You can use this.scene.All things below() addScorePoint setScorePoint addScoreCoin decreaseCurrentPoints decreaseTotalPoints decreaseCoins currentPoints bestPoints totalPoints currentGlobalPoints bestGlobalPoints totalGlobalPoints currentCoins bestCoins totalCoins currentGlobalCoins bestGlobalCoins totalGlobalCoins coins This is all the points or coins function you can use for now
@Skyhub Games — thanks for providing those, I think you need to update your character system node as it will not unlock character if points / coins are not set to global. In Selector system + price node, you should have it like this: var money = this.scene().totalGlobalPoints() not var money = this.scene().totalPoints() This solved the problem for me Itzo
I found this one for 3.0.0.3088. It has a few more things on, but unfortunately some of the functions are broken in BB. http://download.buildbox.com/buildbox/assets/documentation/api.html
Thanks for the solution @itzonator and @Skyhub Games . Check this out @Hanomax and thanks for your help too.
Update : I used var money = this.scene().totalGlobalCoins() and this.scene().decreaseCoins(price); and the character gets unlocked but the problem is the entire coins get deducted.Say coins to unlock character is 3 and i have 4 coins.On click total coins become 0 instead of 1 in character selection screen.Did anyone noticed? @itzonator @Skyhub Games @Hanomax
@itzonator @AaroArts this is the current API reference document: https://www.buildbox.com/help/buildbox-3-api-reference/script/ And more specifically the page about scene() methods: https://www.buildbox.com/help/buildbox-3-api-reference/scene/