Be a Supporter!

Making medals work?

  • 474 Views
  • 2 Replies
New Topic Respond to this Topic
piggyclock
piggyclock
  • Member since: Dec. 14, 2005
  • Offline.
Forum Stats
Member
Level 54
Programmer
Making medals work? 2012-03-26 10:27:17 Reply

I've just finished a project and decided to add medals to it, but I can't seem to get it working.

I've made the medals at the project management and used the code
in the frame along with the "medal pop up area" movie clip.

import com.newgrounds.*;

API.unlockMedal("medal name");

But when I test it, it dosnt regonise it.

It also says on the project management that the status of the medals are Un-tested.

I'd really apresate it some1 could help or recommend a step by step tutorial .

Mattster
Mattster
  • Member since: Nov. 21, 2007
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Making medals work? 2012-03-26 10:32:46 Reply

At 3/26/12 10:27 AM, piggyclock wrote: I've just finished a project and decided to add medals to it, but I can't seem to get it working.

I've made the medals at the project management and used the code
in the frame along with the "medal pop up area" movie clip.

import com.newgrounds.*;

API.unlockMedal("medal name");

But when I test it, it dosnt regonise it.

It also says on the project management that the status of the medals are Un-tested.

I'd really apresate it some1 could help or recommend a step by step tutorial .

Are you Connecting to the API at the start of your project? You can only unlock a medal after a successful connection to the NG API. You'll know it was successful when you get something like this in your output:

[Newgrounds API] :: Medal: You Win!		(locked, 25pts, Challenging)
[Newgrounds API] :: Medal: No Jive For You!		(locked, 10pts, Moderate)
[Newgrounds API] :: 5 medals initialized.
InvisibleWonder
InvisibleWonder
  • Member since: Mar. 8, 2012
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Making medals work? 2012-06-01 17:02:06 Reply

I'm having the same problem AND I'm connecting the API in FlashDevelop. I see the medals read/written there. But on the website, I don't see any output in the API output window, nor do I ever see a medal written out. High scores work though, so I pretty sure I'm connected! Halp!