NaN:NaN
NaN:NaN
--:-- / --:--
Newgrounds Background Image Theme

kosmikun just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Browse Sections

Newgrounds Wiki: getMedal

Page Contents

import com.newgrounds.API;
import com.newgrounds.Medal;


var medal:Medal = API.getMedal(medal_name:String);
import com.newgrounds.API;
import com.newgrounds.Medal;


// get the medal
var medal:Medal = API.getMedal("My Medal");


// let us know if the medal is unlocked or not
if (medal.unlocked) {
    trace(medal.name+" is unlocked!");
} else {
    trace(medal.name+" is not unlocked.");
}