# Help for resetting game

**URL:** <https://forum.kirupa.com/t/help-for-resetting-game/193837>\
**Category:** Uncategorized\
**Created:** [July 18, 2006, 6:56pm UTC](https://forum.kirupa.com/t/help-for-resetting-game/193837 "2006-07-18T18:56:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![msrbrel](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@msrbrel](https://forum.kirupa.com/u/msrbrel)\
**Post date:** [July 18, 2006, 6:56pm UTC](https://forum.kirupa.com/t/help-for-resetting-game/193837/1 "2006-07-18T18:56:56Z")

</div>

I’m trying to figure out how to reset a game that I’ve been working on - my actionscripter is unavailable and I’m not so good! At the end of the game we want a ‘play again’ button, and it needs a script that takes the player to first frame (no problem!) and clears/resets the scoring, which is set up in the game logic code as the following…

\_global.SetScoreItem = function(name, score)  
{  
\_global[name] = \_global[name] + Number(score);  
_root.left\_panel["lp_" + name].text = \_global[name];  
}

\_global.SetScore = function(answer)  
{  
if(answer.knowledge) SetScoreItem(“knowledge”, answer.knowledge);  
if(answer.wellbeing) SetScoreItem(“wellbeing”, answer.wellbeing);  
if(answer.career) SetScoreItem(“career”, answer.career);  
if(answer.students) SetScoreItem(“students”, answer.students);

Any help on a simple script that would do this? Thanks much
