Page 1 of 1

Some beginer questions

PostPosted: Fri Aug 24, 2007 5:19 am
by Kuraudo-sama
My first question is; when I try to add a background it covers my player, how do I get around this?

How exactly do I use the "loadGame" function?

How do you make a pause menu?

How do I keep the screen following my actor when walking?

Is there some way to see what I'm pressing? Like when enter is pressed it say "Enter is pressed".

How do I make it fade in fade out.

Re: Some beginer questions

PostPosted: Fri Aug 24, 2007 1:59 pm
by Jay S.
I can answer some of them... :wink:

Kuraudo-sama wrote:when I try to add a background it covers my player, how do I get around this?

Decrease the Z depth of the background. There's a slider near the upper part of the Actor Control window that adjusts this. (Actors with a greater Z Depth appear over other actors.)

Kuraudo-sama wrote:How exactly do I use the "loadGame" function?

Code: Select all
LoadGame("Game.ged");

where "Game.ged" is the name of the game file you want to load. :)

Kuraudo-sama wrote:How do I keep the screen following my actor when walking?

Make your player actor your view's parent. Select the view actor, then on the Actor Control window, you will see a button with "no parent" on it. Click on this, then from the list of actors, choose your player.

Kuraudo-sama wrote:Is there some way to see what I'm pressing? Like when enter is pressed it say "Enter is pressed".

For a text actor, create a Key Down event, and press the Enter key. Then in the Actions list select Set Text. Type the text you want the actor to change to, then select Immediate Action. Now, if you want the text to change when the Enter key is released, choose a Key Up event and press Enter. Then in Actions select Set Text again and type the text you want.

Kuraudo-sama wrote:How do I make it fade in fade out.

Create an actor that is solid black that would cover your whole view actor. Then in a Draw Actor event you could put in Script Editor:
Code: Select all
transp+=0.1;

(The higher the number you put the faster it will fade out.) Now for a fade in, put
Code: Select all
transp-=0.1;

Have any more questions? :)

Re: Some beginer questions

PostPosted: Fri Aug 24, 2007 2:10 pm
by J Maker
Kuraudo-sama wrote:My first question is; when I try to add a background it covers my player, how do I get around this?

How exactly do I use the "loadGame" function?

How do you make a pause menu?

How do I keep the screen following my actor when walking?

Is there some way to see what I'm pressing? Like when enter is pressed it say "Enter is pressed".

How do I make it fade in fade out.

for the background change the z-depth lower then your player and use this and DO NOT parent the background to anything
Code: Select all
xscreen = view.xscreen + view.width/2.0;
yscreen = view.yscreen + view.height/2.0;
put this in your backgrounds draw actor. then use this for a veiw draw actor
Code: Select all
double weight = 10;
x = ((weight  - 1)*x + (player.x - width/2))/weight;
y = ((weight  - 1)*y + (player.y - height/2))/weight;
for the enter thing, here's a demo