My game has Gameplay Events which are defined server-side (with a bit of JSON in TitleData). These events are basically 'collect X items'. They need to be simple to set up on the server.
What I tried is this:
A Scheduled Task checks TitleData.. it decides when an event becomes active (send them a notification), when it completes, etc. [WORKING]
Clients read TitleData. This tells them which items to collect in-game. They update a statistic (which is named in the TitleData). [WORKING]
Server script, when an event is complete, needs to run through all players, decide whether they have collected enough items, and if they have, it awards them an Inventory Item.
This is the bit I'm struggling with. I have another Task which runs a script on all players, and gives them Inventory Items (that's fine). But I don't seem to be able to run that task from a cloud script. (Reference Error: admin is not defined).
Am I on the right track with this? It does seem a little overcomplicated for what I want to achieve. Should I be using Rules for this?
Thanks,Julian.