Page 2 of 3

Re: talking to actors?

PostPosted: Sat Nov 12, 2011 9:18 pm
by SuperSonic
hunter84 wrote:yes i would like to have some game art because i tried making a character and it wasn't any good.

Well, I'm helping fojam with art right now but once I'm done, I can help you too :D
hunter84 wrote:how do i change the z depth?

Right click on AI and select actor control. Then change the slider labeled zdepth :wink:

Re: talking to actors?

PostPosted: Sat Nov 12, 2011 9:55 pm
by hunter84
its okay i won't be need the game art yet anyway but how would i set it to where i walk in front of Al and press the up key to talk to him i did what you said and then i went into game mode and pressed the up key and it didn't do anything.

Re: talking to actors?

PostPosted: Sat Nov 12, 2011 11:18 pm
by SuperSonic
Could you upload your game files so I can see what's wrong? :)

Re: talking to actors?

PostPosted: Sat Nov 12, 2011 11:33 pm
by hunter84
yeah

Re: talking to actors?

PostPosted: Sun Nov 13, 2011 3:07 pm
by SuperSonic
Ok, I see your problem. In your code you have this:
Code: Select all
if(distance(player.x, player.y, Al.x, Al.y) <= 0)
{
    //hey go right
}

There are two problems with your code. First, on line 1, you have:

if(distance(player.x, player.y, Al.x, Al.y) <= 0)

This number is way to small. Try using 20 :wink:

The second problem is on line 3:

//hey go right

This is what's called a comment. A comment is anything that comes after two slash marks (//). These comments do not get executed. In other words, they don't do anything. They are only useful to add into your code to help other people understand. For example:
Code: Select all
int a;//This is a comment that does nothing.
int b;//Only things that come after the two slashes are comments.
a = 5;//Now 'a' is equal to 5
b = a;//Do you see how comments work now?


So what you have to do is make some code that displays text to the player. You could do this by making an actor called "HeyGoRightText". Then going into the actor control and clicking text, adding a text file and then typing in your message. Then move it right above AI and set it's transperency to 1 (invisible). After that go into your AI code again and do this:
Code: Select all
if(distance(player.x, player.y, Al.x, Al.y) <= 0)
{
    HeyGoRightText.transp = 0;//This will make the message appear ;)
}

Hope that helps :D

Re: talking to actors?

PostPosted: Sun Nov 13, 2011 4:47 pm
by hunter84
o thanks you really helped out thanks.

and did you see what was wrong with the title menu?

Re: talking to actors?

PostPosted: Sun Nov 13, 2011 9:02 pm
by SuperSonic
Ok, here is what you have to do for your main menu. First create a new ged and call it MainMenu.ged. Then put your main menu in their. Make sure you have a button called "start" or something. Next do this:
Code: Select all
start -> left mouse button down -> script editor
LoadGame("PutTheNameOfYourGameHere.ged");

That should do it :wink:

Re: talking to actors?

PostPosted: Sun Nov 13, 2011 9:27 pm
by hunter84
okay but when the game is done what would i do with both geds? is the a program to merge them or something?

Re: talking to actors?

PostPosted: Sun Nov 13, 2011 11:11 pm
by SuperSonic
Okay, when you finish the game, here is what you do. First, export the main menu ged and the actual game ged. Then in the main menu ged change the code to this:
Code: Select all
start -> left mouse button down -> script editor
LoadGame("PutTheNameOfYourGameHere.exe");//See how I changed it to an exe?

Hope that makes sense :)

Re: talking to actors?

PostPosted: Sun Nov 13, 2011 11:18 pm
by hunter84
yeah but when i export my ged do i export both and then upload both? i understand the how to set it up just not how what to do with both geds when its done

Re: talking to actors?

PostPosted: Mon Nov 14, 2011 12:44 am
by SuperSonic
Yes, you have to upload them both :wink:

Re: talking to actors?

PostPosted: Mon Nov 14, 2011 12:46 am
by hunter84
do you like title menus?

Re: talking to actors?

PostPosted: Mon Nov 14, 2011 1:12 am
by SuperSonic
What do you mean? :)

Re: talking to actors?

PostPosted: Mon Nov 14, 2011 1:56 am
by hunter84
have you made any games yet?

Re: talking to actors?

PostPosted: Mon Nov 14, 2011 2:32 am
by SuperSonic
Not any good games but I'm working on one right now with a decent menu system :)