Creating an End and a few other questions.

Game Editor comments and discussion.

Creating an End and a few other questions.

Postby NanoTech » Tue Jan 18, 2011 3:49 pm

Hi all, first off let me say sorry if this is in the wrong section, I'm fresh off the blocks with GE but have picked it up pretty quick by looking at peoples tutorials, i have levels, i have a main character, i have enemies, all in working attacking order too, but I have a few slight problems that i was hoping you guys could help me with.

I've searched around for awhile but have found very little if nothing about what I need.

How do i create an ending to a level? I assume its the create actor/wire frame region/collision/script editor direction of things, but I dont know the code to bring the game to a stop once the main character has passed a certain point.

Scenario is, Main character passes a certain area, the game brings up some text saying "You Won", then returns to the main menu, or brings up the next level.

Other things are my main character, once he starts moving, he wont return to a static state once he's stopped, despite having 4 animations for leftstill, rightstill, leftmove, rightmove.

leftstill, rightstill should activate bringing up a static sprite, but it just plays the leftmove, rightmove sprite animations.

And thats all my problems, everything else has been covered in tutorials or forum posts.

Having a blast with this software btw, its awesome.

:D
NanoTech
 
Posts: 3
Joined: Tue Jan 18, 2011 3:37 pm
Score: 0 Give a positive score

Re: Creating an End and a few other questions.

Postby skydereign » Sat Jan 22, 2011 12:55 am

Can't really help with the animation problem without seeing the code or ged. As for your other problem, on the collision with the wireframe region, create the text, and add an event to that text moving you back to menu.
winText -> KeyDown (enter) -> Script Editor
Code: Select all
DestroyActor("player");
view.x=0;
view.y=0; // move view back to menu
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Creating an End and a few other questions.

Postby NanoTech » Sat Mar 19, 2011 5:13 pm

Thank you for your help on the creating an end thing, just what I wanted.

A few other questions now.

Attached is a loose concept of a level, made for learning purposes.

The following errors occur:

[*]When the space bar is hit, it fires a bullet, the error is the bullet doesn't disappear after it reaches the end of its path, it just loops.[/*]

[*]The enemy(raccoon) doesn't change animations when its path changes, example, when its moving right it says in the left animation.[/*]

And thats what i got so far, any help would be great.

Tech.
Attachments
concept.zip
(966.28 KiB) Downloaded 76 times
NanoTech
 
Posts: 3
Joined: Tue Jan 18, 2011 3:37 pm
Score: 0 Give a positive score

Re: Creating an End and a few other questions.

Postby skydereign » Sun Mar 20, 2011 9:15 am

Okay, so you know there is an event called path finish. It triggers when a designated path finishes (or if any path finishes). So, for the bullet, you can put a path finish event, that calls DestroyActor. For the other one, you are missing the animation. If you go to edit the event path finish (enemy right), you'll notice that the ChangeAnimation is blank.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Creating an End and a few other questions.

Postby NanoTech » Tue Mar 22, 2011 1:10 pm

Fantastic once again, thank you.

Lets drop another question or two now.

How do you set the music to start as the level starts? At the moment I have a collision set up to start the music, is that the only way?

Also, i have a 2d platform game, When i run to the left of the level, the screen follows my actor, and the actor has the ability to fall off of the start of the staging area, is there anyway I can lock the screen so it doesn't go past that certain point and it stops my actor from going there too, like a wall feature?

I assume its a collision wireframe actor of some sort.

Thank you.
NanoTech
 
Posts: 3
Joined: Tue Jan 18, 2011 3:37 pm
Score: 0 Give a positive score

Re: Creating an End and a few other questions.

Postby skydereign » Tue Mar 22, 2011 4:56 pm

First off, just add the start music call in an actor's create actor event. When you have level select, it won't be really like that, but in your case it is fine. For the view part, you can do something like this.
Code: Select all
view.x=max(view.x-5, 0);


This code would be the movement code for the view (moving left). Essentially it says the view's x can be no smaller than 0. Change the zero to what you want. For the wall bit, if you are using tiles, you might as well create a wall off screen. And by off screen I mean the point at which the view can no longer move to. That way you don't have to make a new actor to have a collision event with.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest