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 / Need help with explaination about CASE SELECT to make gamestates for different levels

Author
Message
Midget Blaster
AGK Developer
8
Years of Service
User Offline
Joined: 7th May 2016
Location:
Posted: 24th Sep 2016 15:37
Hello. I am using this material to study AppGameKit script http://agkbuildit.blogspot.ie/2012/04/game-state.html

I am having trouble understanding this. Here is some of the code.


After select statement, what needs to be done? Also, how would you change game state?
As for the code between the cases, I am assuming I will place all my sprites beforehand and make them invisible, then when I call something like level select, all the sprites relating to that will be setspritevisible(x,1). thank you for your help
29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 29th Sep 2016 22:23
Here's an example of a simple game using the select and case commands to control the state of a game



Hope this helps.
Hover Car Race Challenge! - available now on Google Play
Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB
Midget Blaster
AGK Developer
8
Years of Service
User Offline
Joined: 7th May 2016
Location:
Posted: 30th Sep 2016 15:25
Thank you! That is exactly what I needed. I feel this could be included in the agk tutorial or something ass an example for a person that's new to the engine.

Login to post a reply

Server time is: 2024-11-25 01:57:41
Your offset time is: 2024-11-25 01:57:41