<aside> ⚠️ Warning: Before beginning this tutorial, you should have already read through and completed the tutorials for DECORATE and ACS. It is also helpful to come into this knowing how to implement custom graphics and implement custom sounds.
</aside>
Another facet that separates MM8BDM is its diversity of non-weapon Assist items. Assist items can be seen in almost any stage in this game, from the deceptively simple Item-1 to the complicated Rush Jet.
This page will walk you through how to create one of the more complicated style of assist item. Inspired by Beat Call, we’ll be building Elec'n Hover
.
Let’s start somewhere simple, first—A basic item that spawns a projectile on activation.
actor NotItem1 : BaseMM8BDMUseItem
{
inventory.amount 2
inventory.maxamount 4
inventory.pickupmessage "Support Item! Item 1!"
Tag "Item-1"
Inventory.PickupSound "item/1up"
inventory.icon "ITEM1"
Inventory.RespawnTics 350
mass 40
accuracy 16
states
{
SpawnLoop:
WEA2 A -1
loop
Use:
WEA2 D 0 A_SpawnItemEx("Item1Platform", 56, 0, 28, 1)
stop
}
}
actor NotItem1_Respawn : 8BDMItemRespawn
{
translation "192:192=4:4", "198:198=42:42"
mass 350
}
actor NotItem1_RespawnShadow : 8BDMItemRespawnShadow
{
mass 350
States
{
Spawn:
WEA2 A 0
goto Super::Spawn
}
}
The code above defines an assist that will be our template. The actor is called NotItem1
, a simplified copy of Item-1.
Every assist item starts by inheriting from [BaseMM8BDMUseItem](<https://mm8bdm.notion.site/BaseMM8BDMUseItem-31fa996d65aa405d949be4942042ea82>)
, an actor that already exists in Mega Man 8-Bit Deathmatch that sets up more of the semi-universal functionality for such pickups as a whole. Things like visible respawn timers and the event hooks will happen on this actor if you leave it as-is.
It’ll also look like Item-1 if you spawn it in and pick it up. Don’t worry—we’ll get to that later.
Assist items have some properties that should be defined in order to handle the functionality you may want from them.
Sometimes you can carry more than one of a given item, so you’ll want to define how much of one item you have access to by modifying the amount properties. The amount you get on pickup, and the max amount you can carry. Note that these do not have to be the same, but they usually usually are. In our case, let’s make it so they aren’t the same. Just for fun.
inventory.amount 2
inventory.maxamount 4
This will make it so we can carry 4 NotItem1
s, but only get two per pickup. This is fine, just means you can stock up.
Next, you’ll want to see some of the “user info” properties. We’ll start with the messages.
We then define a set of properties corresponding to which messages to play at certain item events.