Just starting...

Game Editor comments and discussion.

Just starting...

Postby sirmatthew » Mon Jun 08, 2009 8:47 pm

Hello--

My first post here. I've designed a game on paper, somewhat more mathematical than graphic-based, but I think Game Editor just might work for what I'm wanting to do. I'm actually pretty excited about creating it and have spent a couple of days scrolling through the demos, watching tutorials on YouTube, studied some of the wiki pages, and read up on all the keywords. I'm just not finding this to be as easy as advertised. I feel like I'm in a dark room, but I know it will all make sense once I can manage to turn the light on. I'm off all week and planning on sticking with it, but am also hoping someone here can help me find the light switch.

Based on one YouTube video tutorial for activation events I created an actor (number) which can be raised or lowered by clicking one of two other actors (buttons...pacman icons in the attached graphic). It works fine. Just to experiment with variables and such I created another field which should subtract the age from the number 100 and display the result. That part is not working yet no matter what I've tried.

There will be no collisions between player objects during game play as it will be set up like a spreadsheet with each number in its fixed place). I don't understand how to save the final age as a variable for use and display elsewhere in the program. Creation of an int variable hasn't been working for me and I'm going a bit nuts here. How and where should the script be written to accomplish this?
Attachments
training01.JPG
sirmatthew
 
Posts: 8
Joined: Tue Jun 02, 2009 4:52 pm
Score: 0 Give a positive score

Re: Just starting...

Postby skydereign » Mon Jun 08, 2009 8:57 pm

Not sure if I completely understand what you are trying to do, so I don't fully grasp your problem, but variables are key for this. There are two ways that you can create variables, one in global code, and one in script editor's add variable. If you are doing it in global code, initializing an int would look like this,
Code: Select all
int age;

age being the name. You would then need to make a name for this code and then click the add button. This variable is open for all to see. The other way is to click the add variable, for now you would just give the variable a name, and then click the add. You want an int, so the defaults are the same. Anyway, since the variable is not actor specific, it would be in global space.
If you make the variable age, then utilize that to store the number, I don't really know how you are holding the number without a variable, unless you are using textNumber, and in that case you could use this built in variable instead, I wouldn't suggest it. So in the text actor displaying the 100-age, you would put this in the draw actor event's script editor.
Code: Select all
textNumber=100-age;

If you post the .ged I could figure out what you are doing, but it is not necessary.
If this is not what you wanted or anything else comes up, I can try to help.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Just starting...

Postby sirmatthew » Mon Jun 08, 2009 9:32 pm

I had to play with it for a minute, but it worked. That was a big step in the right direction, thank you!
Attachments
training01b.JPG
sirmatthew
 
Posts: 8
Joined: Tue Jun 02, 2009 4:52 pm
Score: 0 Give a positive score

Re: Just starting...

Postby Bee-Ant » Tue Jun 09, 2009 12:30 pm

use this instead of textNumber
Code: Select all
sprintf(Text1.text,"Your Age : %i",age);

and
Code: Select all
int rest=100-age;
sprintf(Text2.text,"Number of years until you reach age 100 : %i",rest);

You can save 2 actors this way...
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Just starting...

Postby sirmatthew » Mon Jun 15, 2009 4:02 am

Thanks for the replies, they were quite helpful!

I've been toying with GE all week and think I'm finally getting the hang of it now. I created several test files and played with adding activation events, animations, manipulating variables, etc. Just wanted to post this follow-up as I'm sure there might be others who are tempted to give up if they quickly think GE is difficult to learn. Just give it time and keep playing with it. Now that I better understand what the program can do I'm REALLY excited about future projects!!

Next, I'm going to spend some time creating an interface graphic which will be the primary screen in my game. Once that is done I'll be coding all the action using GE. I may have a question or two later on, but wanted to thank you again for helping me so far.
sirmatthew
 
Posts: 8
Joined: Tue Jun 02, 2009 4:52 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest