The Daily Click ::. Forums ::. Klik Coding Help ::. Question about Adventure/RPG item collecting...
 

Post Reply  Post Oekaki 
 

Posted By Message

Retired Kliker Lazarus

The Ed Wood JR of TDC

Registered
  18/07/2003
Points
  7363
16th November, 2005 at 15:46:42 -

As most of you know, I've only released platformers (with the exception of Nuns with Guns and a crappy little screen saver, both of which caused severe bleeding from the eyes). But now, I'm actually working on an Adventure game, and, seeing as how I've only made platformers, I know very little about coding Adventure/RPGs.

In the game must collect certin items in order to unlock bonuses, but in order to collect these items you must obtain new weapons, which you collect through out the game. So how can I make it that once you collect the item and then die/return to the area later, the item stays gone? Right now, if the player collects the item and dies or advances to the next level and then returns later to the same spot where the item was, the item returns, allowing the player to collect the same item millions of times while giving the player points that they are not worthy of.

This might be a stupid question...But oh well.

Answer me ma question, and I send you a dead puppy.



 
Fine Garbage since 2003.
CURRENT PROJECT:
-Paying off a massive amount of debt in college loans.
-Working in television.

Crystal Clear (H.E.S)

Possibly Insane

Registered
  06/10/2002
Points
  2548
17th November, 2005 at 01:07:49 -

I'm guessing an easy way would be just to set a global value, or INI value.
Player collects item - Set Global value A to 2

Then include an condition in the frame the item is in.
Global Value A = 2 - Destroy Item.
------------------------------------------
This would just make it so after the item has been collected once, a value is changed. then that frame automatically tests to see if the value has changed, if it has (it means the items been collected) it destroys it.

If that makes sense? lol sorry i havent been coding for awhile.

 
HES homepage:
http://www.distinctiv-efair.com/heretic/studios
Crystal Clear Productions: http://www.distinctiv-efair.com/heretic/crystalclear

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
17th November, 2005 at 05:22:03 -

Keep the puppy!

There are several ways. If you have a series of items that will be collected in order, then a global value will suffice for those. Look at my old Evil from the Past game

Heat Suit -> Gun -> Lava Wand -> Gem -> Key
1 -> 2 -> 3 -> 4 -> 5 -> 6

I did the same with Tyrant of Isle Maurico, but with two series of items.

On the other hand, if you have several items that need to be collected individually (like the coins in my scurvy sanchez game), then flags will serve you better. If an item is collected, toggle flag, and if flag is toggled, destroy item.

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
17th November, 2005 at 06:26:38 -

You could also save and load from an INI file if you want a record to be kept between games. Global values have a nasty habit of running out.

 
http://www.davidn.co.nr - Games, music, living in America

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
17th November, 2005 at 07:51:21 -

You could also save and load from an INI file if you want a record to be kept between games. Global values have a nasty habit of running out.

I used that with a global object (flags) for the first SS game. That's why it has loading screens in game (which people claimed to be just lame fake loaders )

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
17th November, 2005 at 09:36:00 -

In Joe's 48 hour Quest (yes, it's a point-and-click game, not a RPG, but it uses the same system) I had it so that when you picked up an item, it set a certain global value to 1. Then, when you used it, it was set to 2. And then you just use the system:

0: Item in level=appear, Item in inventory=disappear
1: Item in level=disappear, Item in inventory=appear
2: Item in level=disappear, Item in inventory=disappear

But as Wong said, global values run out, so it'd be a better idea to use a global array or INI's.

 
n/a

Retired Kliker Lazarus

The Ed Wood JR of TDC

Registered
  18/07/2003
Points
  7363
17th November, 2005 at 10:54:08 -

Thanks, people!

I shall devide the puppy into 1/4ths for you all!

 
Fine Garbage since 2003.
CURRENT PROJECT:
-Paying off a massive amount of debt in college loans.
-Working in television.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
17th November, 2005 at 13:43:21 -

uhh... Mine was just advertising.

But I'm sure Phredreeke and Wong would like their own dead puppy halfs.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click