Re: Keeping Track of a game's storyline/objectivs

Hi,
That's just an example conditional and yes it is entirely game-dependent. In reality your code will look something like this if you were to implement the example above. Let's assume that you want the user to go next to coordinates(50, 40). Once they get there, they should pick up the object at those coordinates.

if (state == States.desiredCoords && x == 50 && y == 40) then: {
// Do something here like advance the state. Assume the next goal is to pick up the object at 50 40:
state = States.pickUpSomething
}

So, to your question of storage, x and y are just integer variables, and state is of type States.
Here is the guide on Python enums: https://docs.python.org/3/library/enum.html



-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : NicklasMCHD via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector

Reply via email to