Page 1 of 1

3 very simple questions!

PostPosted: Sun Jan 09, 2005 4:59 pm
by andreas2k5
1 - How do I exit a game without having to use ctrl-alt-delete after i make it into an executable.


2 - How can i stop music or make it loop until an actor is destroyed


3 - I am making a 1942 remake, i have the animation for banking the airplane left and right but if i make an animation change event on key_down left for example, it loops the animation while the plane is moving left. How do i make it show the animation only once and stick to the last frame so it looks right.

Thank you very much.

ps. Game Editor Rocks! :D

PostPosted: Sun Jan 09, 2005 7:46 pm
by Just4Fun
Hi andreas:

1 - How do I exit a game without having to use ctrl-alt-delete after i make it into an executable.


Use the exitGame function within the script editor. For a full discussion and sample code, go here:

http://www.game-editor.com/forum/viewto ... gracefully[/quote]

2 - How can i stop music or make it loop until an actor is destroyed

This link might answer your second question:
http://game-editor.com/forum/viewtopic. ... stop+sound

3-How do i make it show the animation only once and stick to the last frame so it looks right.


I'm not too sure what you are actually trying to do here, but you can control the frame count in the animation as well as the direction. Check this link for a discussion of keydown and direction:
http://game-editor.com/forum/viewtopic. ... +animation

* You might also try searching the forum to see if other discussions have better answered your problem than those I have posted for you to follow.

HTHs....[/quote]

Thank you! + More questions

PostPosted: Mon Jan 10, 2005 1:07 am
by andreas2k5
First of all thank you very much for your reply. I had a look at the online documentation and solved my sound problem. The "GameExit ();" command however doesnt work for me though!!!!!!!!! It seems to reset the game to its first loaded state (music restarts, etc) but it wont end it!!!

Regarding the animation how do i stop an animation from looping? I only want it to show once and stop at the last frame.

And finally another problem, a particullar key combination doesnt work in my game, ctrl+up fires bullets while moving up, ctrl+left fires bullets while moving left, ctrl+up+right fires bullets while moving diagonally up and to the right, ctrl+up+left DOESNT fire any bullets but the ship moves!!!! Obviously i have mapped the arrow keys to movememnt and the ctrl key to firing bullets (left ctrl that is). Is that a know bug or is it me?

Thanks once again,

Andreas

Sorted GameExit comand!

PostPosted: Mon Jan 10, 2005 3:22 am
by andreas2k5
Thanks again for your help on that, the animation issue still remains though.

:roll:

PostPosted: Mon Jan 10, 2005 6:13 pm
by Just4Fun
andreas,

I just retested the ExitGame() function. It is working fine for me in GE V1.27!

Try this:
Open a new game and save the game as "ExitGameTest"
1. Create an actor named Exit.
2. Add the event on "Mouse Button Down".
3. Add the action "script editor".
4. Put this line of script into the script editor:
ExitGame("ExitGameTest");
Click on "Add", then select "immediate action"
Now close the "Mouse Button Down" Dialogue Box
Run your program and when you click on the "Exit" actor, you should be returned to your game editing.

* I haven't tinkered too much with the animation stuff. I leave that to Ingsan and Jazz-e-bob. I know that one of them can answer your question, but it might be good to post your question again outside of this post because, they may not see it.

Anyway, HTHs...

PostPosted: Tue Jan 11, 2005 12:08 am
by makslane
Just4Fun wrote: 4. Put this line of script into the script editor:
ExitGame("ExitGameTest");


Just use ExitGame();

Re: 3 very simple questions!

PostPosted: Tue Jan 11, 2005 12:10 am
by makslane
andreas2k5 wrote:How do i make it show the animation only once and stick to the last frame so it looks right.


- Use the "Animation Finish" event
- Add the "Change Animation Direction" (Event Actor, Stopped)

Re: Thank you! + More questions

PostPosted: Tue Jan 11, 2005 12:21 am
by makslane
andreas2k5 wrote:a particullar key combination doesnt work in my game, ctrl+up fires bullets while moving up, ctrl+left fires bullets while moving left, ctrl+up+right fires bullets while moving diagonally up and to the right, ctrl+up+left DOESNT fire any bullets but the ship moves!!!!


Work for me! Download a ged example at:

http://game-editor.com/examples/move_and_fire.zip

Thank you super very much!!

PostPosted: Tue Jan 11, 2005 12:25 am
by andreas2k5
:D

Hello again, thank you very much for your answers, the ExitGame function works perfectly now!

Regarding the animation I will try that tonight makslane (even though i am supposed to be working on my PhD) :roll: .

I just want to let you know guys that i have had game editor for 3 days and i already have a very good prototype of my first game. If it proves as easy, fast and stable as it has been so far I will be registering my version before the end of the month.

I cant wait to finish this little game of mine :)


Thank you again