Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Looking for a simple code snippet for clicking

Author
Message
gluestix
3
Years of Service
User Offline
Joined: 25th Jul 2021
Location:
Posted: 25th Jul 2021 16:26
I'm looking for a quick example. Maybe someone can post an asnwer for me.

In a brand new project, I would like to

1. load a background
2. load 2 sprites on top of that

I got that far following the online tutorials. Very simple

3. I would like to click on 1 sprite and make it disappear.

4. Then if clicking on sprite 2, the scene should change to other scene with a background loaded

I'm a beginner and my main problem is, how do I setup 2 scenes go from scene to scene on a click and destroy objects after clicking on them

If possible, can I see an example with AppGameKit Classic and also another with the Visual Editor?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 25th Jul 2021 17:11
Quote: "3. I would like to click on 1 sprite and make it disappear."


Look at GetPointerPressed and SetSpriteVisible

Quote: "4. Then if clicking on sprite 2, the scene should change to other scene with a background loaded"


Look at the code generated by the visual editor, in there is a function to show/hide the scene


programming is all about exploration and research, trial and error, have a crack at it and if you fail then post the code and someone will correct it, look at the examples ETC ETC

People make the effort to help when they see you made the effort to learn, or at least tried, you cant be spoon fed this stuff it needs to come from within you.

Login to post a reply

Server time is: 2024-11-23 12:14:43
Your offset time is: 2024-11-23 12:14:43