This guide will walk you through integrating your Construct game with the Basement.fun platform using web APIs
AJAX.LastData
Create Function
Set Service Method Header
X-Service-Method
setUserScore
Set Authorization Header
Authorization
Bearer <game secret>
<game secret>
with your actual game secret token.Configure POST Request
setUserScore
https://api.basement.fun/launcher
{"launcherJwt": "string", "nonce": "string", "score": 0}
POST
Create Global Variable
Add Trigger Event
Call SetScore Function
Parse JSON Response
AJAX.LastData
in the JSON string field.Extract Nonce Value
JSON.Get("newScore.nonce")
.Set User Score
POST /launcher
X-Service-Method: setUserScore
Get User Score
GET /launcher
X-Service-Method: getUserScore
Trigger Rules Engine
POST /launcher
X-Service-Method: triggerRulesEngine
success
field in API responses and handle errors gracefully.AJAX requests not working
JSON parsing errors
AJAX.LastData
contains valid JSONAuthentication issues