Contact Info / Websites

Entry #1

How to make medal?

2014-05-05 00:39:59 by TheCrimsonScythe

I read a bit about the medal, API system and such thing, but would be good if there is someone who will explain more.

Few month later, I probably would start my game project, just a very simple one, but a medal would be great.

So, before I even start the project, would be good if I know how to make medal first ^^


Comments

You must be logged in to comment on this post.


uncletom321uncletom321

2014-05-05 05:16:51

please tell me when you figure this out me and my friends can't figure it out.


CyberdevilCyberdevil

2014-05-10 13:55:28

What do you need help with exactly? It depends on the program you're using, but if it's Flash (maybe works with other programs too, I haven't tried others), here's a step by step guide:

1. ) Create a Game project (medals can only be applied for games)
2. ) Go to the API Tools tab and download the package for either AS2 or 3 (whichever you are using)
3. ) Open your project file, and the file you downloaded, and drag/copy the API component to your file (it looks like a preloader).
4. ) Copy the API and encryption key from the API Tools tab to the API component properties in your file (view the properties panel of the component to change these settings, along with many other ones)
5. ) Go to 'Medals' under the API tools tab on the project page and enter any medals you want. Medal name is case and space sensitive, so it has to be written exactly the same both here and in your game to work!
6. ) In your game, use this code to unlock the medal:

import com.newgrounds.*;
API.unlockMedal("Your Medal Name");

... it can be added anywhere, on a frame, within a function etc. The first line connects to the NG server, and the second one unlocks the medal. Also remember to enter your medal name between the " marks!
7. ) If you want a 'medal unlocked' notice to show, copy the medal popup component from that API file you downloaded earlier. It's invisible until a medal unlocks, so you can place it anywhere you like, traditionally bottom right corner. If you have a lot of frames, I'd reccomend keeping it on a layer of its own that spans the length of the game, this way it'll be accessible on all frames and doesn't need to be copied in on specific places.
8. ) Use the debug box under the submission preview to check that medals unlock properly.

aaand, I think that's it. Any questions?

TheCrimsonScythe responds:

wow thanks a lot ^^

Im not sure yet about what software i will use, maybe flash or stencyl, or maybe others. I hope it does work the same for the other software than flash.

Anyway, I will update if this didn't work on other games than flash, thanks again!


CyberdevilCyberdevil

2014-05-10 13:56:18

Btw @uncletom321 maybe you're interested in this medal guide too.


CyberdevilCyberdevil

2014-05-12 12:21:55

Alright, hope so!


BeminFireBeminFire

2014-05-13 18:14:27

If you use Stencyl i can tell you EVERYTHING. (PM if you decide to use stencyl)

TheCrimsonScythe responds:

I PM you later if so :)