Advanced Gating Logic
Last updated
Last updated
This page showcases how to extend BPM_GatedAreaBase to create advanced logic for gating.
To get started, create a child class that extends BPM_GatedAreaBase. In this example we are creating a child class of the existing example BPM_GatedArea_Plane.
Within the newly created class, we can override the AllowAccess function and create our gating logic here
The following example shows how we can chain logic together from multiple locations to test for access. The player can gain access here if:
Their name contains the word “Ape” AND they are using an MML avatar from their wallet
OR
It is after 4pm AND they have an NFT stored on Chain ID 1 (Ethereum)
You can see in the screenshots above that the data is not restricted to the gating system. We are checking a gate condition component, the time of day and the M2 Player Profile.
By default, the allow access function will return the logic from the parent class.