How to trigger events when the app is initially opened

Hi,

I would like to trigger some events when the app is opened. It should happen on start, and only be triggered once.

I could set this up by triggering them once the opening scene has been entered, and also if a bool is false, and then set this bool to true - to prevent the events being triggered again once the scene is re-entered.

But I’m just wondering if there’s a cleaner way to do this? Is there a trigger I can use that is called when the app is opened initially?

Thanks,
Laurien

Hey Laurien,

Please see the quick example I have made for you, you will need to add Global Variable to your experience as this is the Boolean to check if the trigger has happened on the first launch of the experience.

On the trigger on , the scene itself you will need to create a conditional trigger See screenshot one if GV value = 0 run the trigger and another one the trigger you wish to reload the scene See screenshot two if GV value = 1 this will ignore the first trigger you set to launch the first time the experience is opened. No matter how many times the scene is reloaded if the value = 1 the trigger will get ignored.

Update: Use @Seb example below as it’s easier :point_down::sunglasses: many ways of making a cake as they say.


I hope this makes sense.

Create a Trigger that is used once on startup.zip (6.9 MB)

Kind Regards

Louie

2 Likes

Hi @laurien.ash , (and @Promultis :wink: )

There is actually a much simpler way. Add a timer trigger on your experience itself (not on the scene) as shown below, and make sure this trigger is raised only once.

3 Likes

Haha yep I was worried I was making the cake in a non-optimal way :slight_smile:

Thanks both for your input - I hadn’t thought about using a timer on start, I’ll go with that!

Best,
Laurien

1 Like