View Full Version : Help needed for simple problem
08-10-2008, 10:04 AM
I am making a game and when my character reaches a certain location then the game ends and the player wins.
How would I go about doing this? and what would the code be?
(basically im thinking of querying when the coordinates of the character and the location match, so an if statement is likely, but where would it go in the code? and how would i call it?)
Im pretty bad at OpenGL as you might realise.
Thanks for any help
08-10-2008, 10:32 AM
This is not an OpenGL related problem. OpenGL is for drawing things, not for querying coordinates for any characters... please buy some books about general programming, do some classes/tutorials and ask for support in a forum dedicated to beginners programmers.
08-10-2008, 10:59 AM
Can you not tell me? Do you not know? It doesnt seem like a complicated thing to do for experienced users, I just cant find it anywhere. Not exactly what i want anyway. And before you refer me to any other source of knowledge where i should do the right thing and find out for myself, I am on a limited timescale and am in need of a quick answer.
08-10-2008, 11:22 AM
Right now you are like a guy who asks a baker how to make a beefsteak. Yes, your question is not complicated, but I can't imagine how you, with seemingly no programming experience whatsoever (or else you wouldn't ask such questions) are going to accomplish this goal in a "limited timescale". You have to learn things step by step, and you have to learn basics before you try to do anything useful.
But still, if you insist, here is the answer: you match the coordinates of your character against the location coordinates and if they match you end the game... the rest is your code design.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.