New to Game Editor and have ?

Game Editor comments and discussion.

New to Game Editor and have ?

Postby REDNSX » Sun Feb 13, 2011 6:17 am

Hi

I just started to use GE about 5 days ago. I am a 3D artist that has been in video games industry for over 10 years but have not done any code stuff. So far I have made my main actor move around and have collision with objects just your basic stuff. One thing I cant get to work since I dont code at all is to get the time go negative. For example I want to have a time limit of 30 sec. so basically I just want it to do this. 30 then 29 then 28 then 27 ect. untill it goes to 0.

I am sure that this has been answerd befor but could some one give me step by step how to do this. I have seen some post on it but for me since I just started to use GE its hard to fallow without it being very spacific about it. So is any one could please help me out with this i would be very happy.
User avatar
REDNSX
 
Posts: 237
Joined: Sun Feb 13, 2011 3:03 am
Score: 7 Give a positive score

Re: New to Game Editor and have ?

Postby skydereign » Sun Feb 13, 2011 6:56 am

Well in your case time would be a variable. To display it, you will need a text actor. Not sure how much you know about variables, but knowing them will help you a lot. This breaks it down as much as I think it can be (maybe).

1. Create your timeText actor.
2. Add text to your actor.
i. Click [Text] in the actor control panel.
ii. Click [New Font].
iii. Click [True Type].
iv. Click File and choose your font (and other settings).
v. In the text area, type 0.
vi. Exit by clicking [Ok] and [Ok].

3. Create a draw actor event (Script Editor).
4. Add your time variable.
i. Click [Variables]
ii. Click [Add]
iii. Set the name to be time (or whatever you want it to be).
iv. Click [Add]
v. Click [Close]

5. Type this code into the script editor, and add.
Code: Select all
time--;
textNumber=time/30;


6. In some event, for this example Create Actor, set time to start the timer.
i. Create the event (Script Editor).
ii. Set time to 900 (30 fps for 30 seconds, so 900 frames).
Code: Select all
time=900;


And that should do it. This current setup won't do anything when the timer reaches zero but if you need help with that, or anything else, just ask.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: New to Game Editor and have ?

Postby REDNSX » Sun Feb 13, 2011 8:52 am

Thanks alot. That help me out so now I got the time to go down. I want it to go to a screen that says Game over once the time is over. So yeah that would be my next question. I am still very new to GE so I have another thing to ask.

1. Do I have to make all my levels in one file? if so how do you get the view to go from one place to another when you click a botton?


Since I have only worked with 3D cameras and all you do is move the camera it is easy, but in a 2d layout like GE I have no idea how to do this.
User avatar
REDNSX
 
Posts: 237
Joined: Sun Feb 13, 2011 3:03 am
Score: 7 Give a positive score

Re: New to Game Editor and have ?

Postby skydereign » Sun Feb 13, 2011 9:03 am

Okay, for the timeText actor, the draw would look like this.
Code: Select all
time--;
textNumber=time/30;

if(time==0)
{
    // either CreateActor (your game over actor)
    /// and/or move the view
}


The if(time==0) activates the code within the {} when the timer reaches zero.

As for your levels, are you making 3d games? What happens in gameEditor is that you are restricted to one angle of the camera (view). Normally this is used for a platformer type angle, or topdown. If you set up your images properly, you can also do a 2.5d type game. To move it around, you can set its xy coordinates. The view is an actor, so if you want to make it move to a certain position when you press a button, you can do this.
button -> MouseButtonDown (left) -> Script Editor
Code: Select all
view.x=100;
view.y=200;


This would move the view to point (100,200). Do remember that frame actors (view, filled, wireframe, canvas) xy coordinates are based off the top left pixel of the actor.

You can make all of your levels in one ged, or split them out and use the LoadGame function between them. I prefer to keep them in one game, and use activation regions to separate them. The main advantage to this is if you change your player actor for one level, you don't have to change it for every other file.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: New to Game Editor and have ?

Postby REDNSX » Sun Feb 13, 2011 11:30 am

I will try this right now and see. I am sure I will need more help on this since I am kind of understanding what you just told me. So I will try this.

Thanks again because I am new to code and I hope you undersant if i ask a stupid question.
User avatar
REDNSX
 
Posts: 237
Joined: Sun Feb 13, 2011 3:03 am
Score: 7 Give a positive score

Re: New to Game Editor and have ?

Postby skydereign » Sun Feb 13, 2011 11:41 am

No worries. As long as you are willing to learn, and put some effort into it, no question you ask will be stupid. If you feel like the question has already answered on the forums, but still don't understand, you can always pm me any questions you have.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: New to Game Editor and have ?

Postby REDNSX » Mon Feb 14, 2011 7:18 pm

Thanks. I still have not tryed the game over thing yet.

I want to make this a iphone game so will it be hard to do this with GE? Also I notice that you cant scale things up or down. So right now I have png files that are for example 123x41 for them to be the right size. Will this be a problem once I try to put it on iphone. Dont they have to be power of 2?
User avatar
REDNSX
 
Posts: 237
Joined: Sun Feb 13, 2011 3:03 am
Score: 7 Give a positive score

Re: New to Game Editor and have ?

Postby skydereign » Mon Feb 14, 2011 8:51 pm

Well I just got a game I made with Omni-arts approved, and it wasn't too difficult. I asked around, and with the help of some other users, I got it done. The actual game making part is just like making any game (except for multitouch). The version of gE that you have can scale using canvas, but generally it is much easier to use animations for scaling. The 1.5 version has scaling, and it seems pretty decent, but that won't come out for a while it seems.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: New to Game Editor and have ?

Postby REDNSX » Tue Feb 15, 2011 1:23 am

That is cool you have your game done. So as far as the size of the images goes they do have to be power of 2? You know 32x32 64x64 128x128 ect.?
User avatar
REDNSX
 
Posts: 237
Joined: Sun Feb 13, 2011 3:03 am
Score: 7 Give a positive score

Re: New to Game Editor and have ?

Postby skydereign » Tue Feb 15, 2011 1:27 am

No it doesn't matter. The only big thing to note is that images can't be over 1024 pixels in either direction.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: New to Game Editor and have ?

Postby REDNSX » Wed Feb 16, 2011 3:29 pm

OK so the size in not going to make a problem later then that is good.

Right now I want to have one actor distroyed when it hits another actor then when that happens I want 5 other actors that are coins that are also the same be created on screen. So for example lets say I have a rock that hit another rock. what I want happen is that when they hit eack other they diapear and create coins for example. I know how to make them disapear but cant get them to create the other actors coins that I want. when I do that they only want to apeair at a position relative to the rock.
User avatar
REDNSX
 
Posts: 237
Joined: Sun Feb 13, 2011 3:03 am
Score: 7 Give a positive score

Re: New to Game Editor and have ?

Postby skydereign » Wed Feb 16, 2011 9:30 pm

Normally you do want to specify relative to the rock. Most things will happen relative to the creator actor. If that is not the case, at the end of the CreateActor(), it says false. If you set that to true, it will make it relative to the global position.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: New to Game Editor and have ?

Postby REDNSX » Sat Feb 19, 2011 12:01 am

thanks for your help. I have not had the chance to work on GE for like 4 days.

I have another question. This might be a dumb one but how do you get the game to pause. I mean pause everything. I can set the space bar to PauseGameOn but then I have no idea how to make it toggle from PauseGameOn to PauseGameOff. I there a easy way to do this?
User avatar
REDNSX
 
Posts: 237
Joined: Sun Feb 13, 2011 3:03 am
Score: 7 Give a positive score

Re: New to Game Editor and have ?

Postby skydereign » Sat Feb 19, 2011 12:07 am

Well, I always have a variable called gameState. If I were to use PauseGameOn(), I would set gameState to some value, for this example 1. So, when pressing space, it would look like this.
Code: Select all
switch(gameState)
{
    case 0: // not paused
    gameState=1;
    PauseGameOn();
    break;

    case 1: // paused
    gameState=0;
    PauseGameOff();
    break;
}


What that does is check what gameState equals, and execute the proper code. So if it is zero, it will pause the game, and if it is one, it will unpause.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: New to Game Editor and have ?

Postby REDNSX » Sat Feb 19, 2011 12:21 am

this is were my very little knowing of code come in. what do you mean by "variable called gameState". I tryed to cony your code to a actor but it told me there were errors on line 1,4 and 8. So this just tells me that I am not really uderstanding what is going on.
User avatar
REDNSX
 
Posts: 237
Joined: Sun Feb 13, 2011 3:03 am
Score: 7 Give a positive score

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest