How would I make the other characters in my game talk?

Talk about making games.

How would I make the other characters in my game talk?

Postby lilmuleman214 » Thu Aug 02, 2007 12:18 am

How would I make the other characters in my game talk, when I go to them?
Life is to good to waste
Go To http://www.Game-junkiez.us
to play/download my games.
User avatar
lilmuleman214
 
Posts: 102
Joined: Wed Jul 25, 2007 6:42 pm
Score: 5 Give a positive score

Postby pixelpoop » Thu Aug 02, 2007 1:24 am

How about using the distance function on a key down event to determine if your player is close enough to a certain character. If it is then create an actor with the text you want to display in it.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby arcreamer » Thu Aug 02, 2007 1:39 am

hey pixel, whats the distant function?
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

Postby lilmuleman214 » Thu Aug 02, 2007 3:15 am

yah, it sounds cool. How Do you do that?
Life is to good to waste
Go To http://www.Game-junkiez.us
to play/download my games.
User avatar
lilmuleman214
 
Posts: 102
Joined: Wed Jul 25, 2007 6:42 pm
Score: 5 Give a positive score

Postby pixelpoop » Thu Aug 02, 2007 10:38 am

it looks like this: distance( x, y, x, y);

You could use it on a key down event to create a text actor, something like this:

if ( distance(player.x, player.y, character_01.x, character_01.y)<30){
CreateActor("text_box", "script_01", "view", "(none)", 0, 0, true);}

it reads, if the the distance between player and character_01 is less than 30 pixels then create actor text_box and goto the animation script_01.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby lilmuleman214 » Thu Aug 02, 2007 5:31 pm

Do you have to make any certain actors to get it to work, like a textbox? or things like that? And are there any events that you have to add to certain actors to get it to work?
And one last question....Where would I put that code you just showed me?
Life is to good to waste
Go To http://www.Game-junkiez.us
to play/download my games.
User avatar
lilmuleman214
 
Posts: 102
Joined: Wed Jul 25, 2007 6:42 pm
Score: 5 Give a positive score

Postby pixelpoop » Thu Aug 02, 2007 6:47 pm

you have to create your text actor. then change the name and animation where it says create actor. Here is a quick example.
Attachments
close_to_talk_to.zip
uses the distance function to start a conversation
(195.96 KiB) Downloaded 111 times
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby lilmuleman214 » Thu Aug 02, 2007 6:49 pm

pixelpoop wrote:you have to create your text actor. then change the name and animation where it says create actor. Here is a quick example.

thanks
Life is to good to waste
Go To http://www.Game-junkiez.us
to play/download my games.
User avatar
lilmuleman214
 
Posts: 102
Joined: Wed Jul 25, 2007 6:42 pm
Score: 5 Give a positive score

Postby lilmuleman214 » Thu Aug 02, 2007 6:54 pm

ok I unsterstand how to it now, but if I wanted to add more then one of these how would I do That?
Life is to good to waste
Go To http://www.Game-junkiez.us
to play/download my games.
User avatar
lilmuleman214
 
Posts: 102
Joined: Wed Jul 25, 2007 6:42 pm
Score: 5 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron