Gdevelop Beginner - Simple button don't work?

Hello,

There is something I think I don’t understand. I am just a beginner and I guess there is a fundamental I can’t grab.

I created a folder ‘Images’ in my project structure beside game.json. In it 3 png files for various button states.
On the scene I create a button object with three animations : a picture for stand state, hover and pressed.

I created events in my scene as this tutorial shows : GDevelop 5 [GDevelop wiki]

In the preview NOTHING HAPPENS !! Ok yes I can see my button but it never changes whatever I do ??

I thought it was a problem of capturing my mouse. To check it I create a scene variable. And I add a text event on the screen. I add an event : everytime MouseX is > my var, display MouseX in the text field and update my var : NOTHING HAPPENS.

So I finally decided to add an event at the launch of my scene : create a object existing in the library : NOTHING HAPPENS.

Conclusion : I have a problem with events !!! :slightly_smiling_face:
Can someone enlight me please ?

Alexandre

Can you show us the event?

I am going to send a screen capture… Thanks for you to be here !

Here is the screen capture.

OK SOLVED !! Thanks Ruhan for pushing me to pay attention to the events window.

I hadn’t realized the split there is between events and I was adding contradictory conditions on a given object. So I am going now to use right button to select ADD NEW or ADD NEW SUB EVENT !
I am so glad it works ! :-)))
Alexandre

5 Likes