Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Zelda Help!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Zatch_Bell




PostPosted: Tue Dec 05, 2006 10:12 am   Post subject: Zelda Help!

I have been working on a Zelda game and I need to know how to make it so when I'm infront of another person, when I push CTRL, how do I make it so they talk?

Any little help will be appreciated Smile
Sponsor
Sponsor
Sponsor
sponsor
ericfourfour




PostPosted: Tue Dec 05, 2006 3:19 pm   Post subject: (No subject)

pseudo:
if ctrl pressed
    if in front of person
        activate person's speech


So basically give every person a speech who needs one.
ericfourfour




PostPosted: Tue Dec 05, 2006 3:21 pm   Post subject: (No subject)

Almost forgot. Look up Input.KeyDown or Input.hasch/Input.getch to get the key being pressed. The constant for the control key I think is KEY_CTRL.
Dan




PostPosted: Tue Dec 05, 2006 6:09 pm   Post subject: (No subject)

In the game boy Zelda games talk is ushely the same as the atack buttion so i whold put it in your atack logic. Realy a NPC should be the same as an enemy but they can but be hurt and when they are hit they talk rather then take damge.

Ideal this sort of thing whould be done using object oriented consecpts but since this is turing and you probly have not learned about such things you might find an aporach like ericfourfours closer to home.

You will need to have some kind of consleion dection system that will check to see if you are toching the NPC or close enougth, and then you just need a simple check to see if the key is presed.

For coneslion dection you should use a title system, there are some tutorals about it for turing on this site. It whould be close to what the real zelda games use.

Sorry if this post is rather ungorgnized and everywhere, but it helps if you post some of you code so we have some idea where you are at and what you are trying.[/code]
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Zatch_Bell




PostPosted: Tue Jan 09, 2007 2:33 pm   Post subject: Re: Zelda Help!

Sorry for the late reply...I have been trying real hard to try and get it right...My code is at home but I got the speech to work a bit...but I need a code that will help me go inside houses...lol sorry but I can't figure it out...

Also with the speech thanks alot, it is set as my Space Bar and it works pretty well!

Any more help would be greatly appreciated Razz
Clayton




PostPosted: Tue Jan 09, 2007 4:22 pm   Post subject: Re: Zelda Help!

for entering a house, you should have each of your tiles marked as a different type (ie traversable, non-traversable, door). Should you travel on a door space, have a filename associated with that tile (ideally you should have a record of tiles) and draw the picture (that's the file) to be in the building/cave/arena whatever.
Zatch_Bell




PostPosted: Tue Jan 09, 2007 8:11 pm   Post subject: Re: Zelda Help!

Oh....lol ok I get it now! Thanks a lot!

I'll update on it when I'm further through then I'll post my code Smile
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: