Yellow Coin: Difference between revisions

Strongly disagree with using a special infobox for only coins, means changes to the template need to go to many templates. Also, coin duplication is not limited to cloning, use links instead.
mNo edit summary
(Strongly disagree with using a special infobox for only coins, means changes to the template need to go to many templates. Also, coin duplication is not limited to cloning, use links instead.)
Line 1: Line 1:
{{Coin_infobox
{{object_infobox_2
|title=Yellow Coin
|title= Yellow Coin
|image=Yellow_Coin.gif
|image= Yellow_Coin.gif
|coin_value=1
|group=Level
|tangibility=1000
|tangibility=1000
|draw=4000
|draw=4000
Line 8: Line 8:
|friction=
|friction=
|buoyancy=
|buoyancy=
|interaction=Coin
|coin_value=1
|radius=100
|radius=100
|height=64
|height=64
|offset=0
|offset=0
|foundIn=[[All Courses]]<br>[[The Castle]]
|related=[[Red Coin|Red]] and [[Blue Coin]]s
}}
}}
'''Yellow Coins''' are [[object]]s found in every level. When Mario interacts with a yellow coin, the [[coin counter]] increases, [[Mario]] is healed, and the coin unloads. When the coin counter reaches 100 while in one of the 15 [[courses]], a [[100 Coin Star]] is spawned above [[Mario]]. The amount that the coin counter increases and the amount that Mario is healed is determined by the coin's value, which is 1, 2, or 5 for yellow, red, and blue coins, respectively. Some yellow coins are spawned by [[Coin Spawner]]s.
'''Yellow Coins''' are [[object]]s found in every level. When Mario interacts with a yellow coin, the [[coin counter]] increases, [[Mario]] is healed, and the coin unloads. When the coin counter reaches 100 while in one of the 15 [[courses]], a [[100 Coin Star]] is spawned above [[Mario]]. The amount that the coin counter increases and the amount that Mario is healed is determined by the coin's value, which is 1, 2, or 5 for yellow, red, and blue coins, respectively. Some yellow coins are spawned by [[Coin Spawner]]s.
Line 19: Line 19:


== Coin Duplication ==
== Coin Duplication ==
''Main article: [[Cloning]]''
When Mario interacts with a coin, a flag is set which informs the coin to unload when it next updates. When the coin unloads, it marks itself as "collected" so that it does not spawn again when Mario leaves the area and returns. Using [[cloning]] or [[Time Stop]], we can prevent the coin from updating, and thus collect it without the coin being marked as "collected". This allows us to spawn the coin again, even after collecting it, effectively duplicating the coin.
 
When Mario interacts with a coin, a flag is set which informs the coin to unload when it next updates. When the coin unloads, it marks itself as "collected" so that it does not spawn again when Mario leaves the area and returns. Using cloning or Time Stop, we can prevent the coin from updating, and thus collect it without the coin being marked as "collected". This allows us to spawn the coin again, even after collecting it, effectively duplicating the coin.


In this way it is possible to collect more than the normal number of coins in a level. In several levels, it is possible to increase the coin counter to 999. However, when using [[cloning]] by itself, each duplicated coin takes up an [[object slot]] in memory. There are only 240 object slots total, and attempting to spawn an additional object once all of them are full will cause the game to freeze.
In this way it is possible to collect more than the normal number of coins in a level. In several levels, it is possible to increase the coin counter to 999. However, when using [[cloning]] by itself, each duplicated coin takes up an [[object slot]] in memory. There are only 240 object slots total, and attempting to spawn an additional object once all of them are full will cause the game to freeze.