Jump to content

Photo

"Free Parking"-esque Money-Spent Counter


  • Please log in to reply
17 replies to this topic

#16 Avaro

Avaro

    >w<

  • Members

Posted 21 September 2014 - 07:37 AM

Here's the alternate solution that let's you use the build-in info room type. Don't mind me. I just want to show it's possible :)

ffc script DonationRoom{
    void run(int amountNeededForReward, int counterToUse int reward, int screenD){
        while(true){
            if(Game->Counter[counterToUse] >= amountNeededForReward && Screen->D[screenD] == 0){
                item rewardItem = Screen->CreateItem(reward);
                SetItemPickup(rewardItem, IP_HOLDUP, true);
                rewardItem->X = Link->X;
                rewardItem->Y = Link->Y;
                Screen->D[screenD] = 1;
                WaitNoAction();
            }
            Waitframe();
        }
    }
}

D0 is the donation amount needed for the reward, D1 is the counter to use (counters 7 to 31 are script counters), D2 is the reward item and D3 is the Screen->D to use (you could leave that at 0).

 

In the info strings you need to use string control codes to increase the custom counter by the amount the player has spend.



#17 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 21 September 2014 - 10:26 AM

@Freya: Anyone can use this. Especially now that it's in the script DB.



#18 Deedee

Deedee

    Small Pixie Dragon

  • Administrators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 21 September 2014 - 11:43 AM

Nice! Although I think a more appropriate name would be "Z3 Wishing Well", due to how similar it works to the "Pond of Happiness" from Z3.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users