Red Coins - Lord-G-INC/SMG2-Project-Template GitHub Wiki

Required Files

File Path and Name Type
/LayoutData/RedCoinCounter.arc Custom
/LayoutData/RedCoinCounterPlayer.arc Custom
/ObjectData/RedCoin.arc Custom
/ObjectData/RedCoinSwitch.arc Custom

Behavior

Red Coins activate an event when all of them are collected, typically 8.

Setup and Usage

Red Coins must be linked to a Red Coin Controller through Group ID. Once all the linked Red Coins are collected, the SW_A event linked to the Red Coin Controller is activated.

redcoinall
Here, a Power Star Spawner is linked to the Red Coin Controller.

Parameters (Red Coin)

Parameter Name Type Name Default Value Purpose
Obj_arg0 float SW_B activation launch velocity 250 Defined below
Obj_arg1 bool Red Coin Counter Number Position false Defined below
Obj_arg2 long SW_B activation appear delay 0 Defined below
Obj_arg3 bool Shadow Calculation Identical to Coin NA
Obj_arg4 int Pose Type Identical to Coin NA
Obj_arg5 float Shadow Drop Distance Identical to Coin NA
Obj_arg6 int Shadow Type Identical to Coin NA
Obj_arg7 bool Inside Bubble? Identical to Coin NA
SW_APPEAR Switch (Read) NA NA Appear
SW_A Switch (Write) NA NA Activates on coin collection
SW_B Switch (Read) NA NA Appear Pop
GroupId long Red Coin Group NA Links Red Coins to the Red Coin Controller

redcoinappear
This Red Coin is spawned using SW_B and is using the default Obj_arg0 launch velocity value of 250.
The appearance can be delayed using Obj_arg4
Red Coins will never time out.

redcoinairbubble
This Red Coin is in an Air Bubble as Obj_arg1 is set to true.

redcoinlayoutpos
Obj_arg7 determines the number layout behavior. The left Red Coin uses the default option (-1), which means the number will appear and follow the Red Coin's position. The right Red Coin has Obj_arg7 set to 0, which causes the number to follow the player instead.

Parameters (Red Coin Controller)

Parameter Name Type Name Default Value Purpose
Obj_arg0 bool Reward Coins true Defined below
Obj_arg1 long Power Star Check 0 (Disabled) Defined below
Obj_arg2 long Picture Font Icon ID 55 (Power Star) Defined below
Obj_arg3 long Layout Visibility Behavior -1 Defined below
SW_A Switch (Write) NA NA Activates when all linked Red Coins are collected
GroupId long Red Coin Group NA Links Red Coins to the Red Coin Controller

Obj_arg0 determines if 2 coins should be rewarded when a Red Coin is collected. This is true by default.

redcoincounterstarindicator
Object arguments 1 and 2 determine the small star icon. This icon only appears when the Star ID defined in Obj_arg1 is collected. Obj_arg2 determines the Picture Font Icon ID to display. The number must not be in hex.
If Icon 0x72 (Bronze Power Star) is desired, then 114 would be set in the Obj_arg2 field.
This feature is entirely optional.

Obj_arg3 determines the RedCoinCounter's visibility behavior. Default (-1) sets the layout to appear on collection of the first coin.
Setting it to 0 will cause the layout to be constantly visible, until all linked Red Coins are collected.

⚠️ **GitHub.com Fallback** ⚠️