Author Topic: Collectibles - How do they work?  (Read 8066 times)

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Collectibles - How do they work?
« on: November 14, 2013, 11:40:31 PM »
I can't see anything in the .xml files that show how the collectible items work. The coins give a discount on stores - how is that configured in the XML or in the editor? The levels released don't show any scripting for the coins. The planks have a global counter - which makes sense and is easy to figure out - but the coins themselves give a discount without any apparent method :/ 

The main difference I see is that the plank behaves as 'collectible' while the coins behave as 'money' with a value of 0.

Does having the Value of 0 have some hard-coded properties?

NekoBaron

  • Posts: 124
  • Scripting Wizard
    • View Profile
Re: Collectibles - How do they work?
« Reply #1 on: November 15, 2013, 08:05:09 PM »
The coins just handle the discount for shops automatically and its the amount you collect that determine the amount they reduce it buy, you cant make a coin that reduces by 20% itself.

I just hide em around my campaign every so often and hope for the best for now.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Collectibles - How do they work?
« Reply #2 on: November 15, 2013, 08:20:31 PM »
Thanks Neko - I know WHAT they do, I wanted to know HOW they do it. So that I can make collectible items of my own, etc.

NekoBaron

  • Posts: 124
  • Scripting Wizard
    • View Profile
Re: Collectibles - How do they work?
« Reply #3 on: November 16, 2013, 12:36:27 AM »
You kind of answered you own question since you seem to know how the planks worked.

You can give a global any name and check it whenever you want it to.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Collectibles - How do they work?
« Reply #4 on: November 16, 2013, 03:16:10 AM »
So the coins are hard coded then?

Is there any known purpose for the orbs/crystals?

NekoBaron

  • Posts: 124
  • Scripting Wizard
    • View Profile
Re: Collectibles - How do they work?
« Reply #5 on: November 16, 2013, 12:39:17 PM »
I think the orbs are like planks, for use however you want. I'm using the orbs as the main item to collect for my campaign.

Hipshot

  • Developer
  • Posts: 455
  • Level Designer
    • View Profile
Re: Collectibles - How do they work?
« Reply #6 on: November 18, 2013, 08:28:38 AM »
The coins are hard coded yes, they just use the same name form as the planks.

Keppler

  • Posts: 19
    • View Profile
Re: Collectibles - How do they work?
« Reply #7 on: January 10, 2014, 09:27:44 AM »
Haha!