Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [REQUEST] Key counter engine of some sort  (Read 1160 times)

0 Members and 1 Guest are viewing this topic.

Zhello

N.A.D.I.
[REQUEST] Key counter engine of some sort
« on: June 12, 2009, 12:38:27 am »
  • L'homme avec beaucoup de noms.
  • *
  • Reputation: +6/-1
  • Offline Offline
  • Gender: Male
  • Posts: 925
I finally got to the point in my project where I must create a temple.  Like in every Zelda game you need a key to open a door.  I am asking you guys if there is an existing engine around here.  If you guys post something helpful I would really appreciate it. :)
Logged
The IT Guy
Intermediate Coder
Linux is a wonderful thing
~Linkwolf48/Gumstone1080~

The Legend of Zelda - New Beginnings

http://zfgc.com/forum/index.php?topic=34986.0
1.6 Demo -
https://www.dropbox.com/s/56km0iadaras56g/LoZNB%20Game%20Folder.rar?dl=0


Side Projects:

Dragon Diary - Cybernetic Threat
Story: http://wiki.zfgc.com/Cybernetic_Threat

Quote
Aero88
ZFGC is like the Hotel California.  You can come in but you can never leave!

devianart: http://linkwolf48.deviantart.com/
Re: [REQUEST] Key counter engine of some sort
« Reply #1 on: June 12, 2009, 12:45:21 am »
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1767
You don't necessarily need an engine, it's really simple. Just make a variable called somethin like keycount starting at 0. Then just increment the number whenever you get a key. Then when you hit a door that's locked:

Code: [Select]
if (keycount > 0)
{
   [Open Door]
}
else
{
   [Denied]
}

As simple as that.
Logged
  • https://colbydude.com

Zhello

N.A.D.I.
Re: [REQUEST] Key counter engine of some sort
« Reply #2 on: June 12, 2009, 01:20:08 am »
  • L'homme avec beaucoup de noms.
  • *
  • Reputation: +6/-1
  • Offline Offline
  • Gender: Male
  • Posts: 925
Thx Colbydude, if this is your code ill add you to credits for my game/demo
Logged
The IT Guy
Intermediate Coder
Linux is a wonderful thing
~Linkwolf48/Gumstone1080~

The Legend of Zelda - New Beginnings

http://zfgc.com/forum/index.php?topic=34986.0
1.6 Demo -
https://www.dropbox.com/s/56km0iadaras56g/LoZNB%20Game%20Folder.rar?dl=0


Side Projects:

Dragon Diary - Cybernetic Threat
Story: http://wiki.zfgc.com/Cybernetic_Threat

Quote
Aero88
ZFGC is like the Hotel California.  You can come in but you can never leave!

devianart: http://linkwolf48.deviantart.com/
Re: [REQUEST] Key counter engine of some sort
« Reply #3 on: June 12, 2009, 01:22:35 am »
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1767
Well it's not really MY code, it's just common programming sense. :P But if you wanna throw me in the special thanks, be my guest.
Logged
  • https://colbydude.com
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.343 seconds with 45 queries.