[CS] Bomberman

[CS] Bomberman v1.2

can you make him an abylity to spawn a bomb?
Yeah I was gonna say, like how Foreman Spike in the Extra Characters Plus mod can? That'd be fire.
Or maybe even just add compatibility for it where if you have it installed he can use his bomb move? Like how some mods allow characters to use the Bowser mod's shell attack if you have it installed?
Not sure how viable any of that is though but it would be really cool if it can be done.
 
  • Like
Reactions: PointOfHumanity
Gaem updated [CS] Bomberman with a new update entry:

v1.1

Adjustments have been made to the torso.

View attachment 7629

Read the rest of this update entry...
Don't double post! Use that edit button! Post automatically merged:

can you make him an abylity to spawn a bomb?
Yeah I was gonna say, like how Foreman Spike in the Extra Characters Plus mod can? That'd be fire.
Or maybe even just add compatibility for it where if you have it installed he can use his bomb move? Like how some mods allow characters to use the Bowser mod's shell attack if you have it installed?
Not sure how viable any of that is though but it would be really cool if it can be done.
Custom moveset isn't part of the plan but if there's a coder who would like to give a hand then it's not out of the question.
 
Last edited:
Gaem updated [CS] Bomberman with a new update entry:

v1.1



Read the rest of this update entry...
Don't double post! Use that edit button! Post automatically merged:



Custom moveset isn't part of the plan but if there's a coder who would like to give a hand then it's not out of the question.
Gemini made this code for the bombs:

local bomb_cooldown = 0

local function throw_bomb_update(m)
-- Crucial fix: Only run for the local player to stop 16x duplicate spawning loop errors
if m.playerIndex ~= 0 then return end

-- Cooldown countdown
if bomb_cooldown > 0 then
bomb_cooldown = bomb_cooldown - 1
end

-- Modern Input Check: Holding L Trigger AND pressing A Button
local a_pressed = (m.controller.buttonPressed & A_BUTTON) ~= 0
local l_held = (m.controller.buttonDown & L_TRIG) ~= 0

if a_pressed and l_held then
-- Only throw if not cooling down and not already holding an item
if bomb_cooldown == 0 and m.heldObj == nil then

-- Spawns a synchronized Bob-omb using modern E_MODEL naming to prevent script errors
local bomb = spawn_sync_object(
id_bhvBobomb,
E_MODEL_BLACK_BOBOMB,
m.pos.x, m.pos.y + 60, m.pos.z,
nil
)

if bomb ~= nil then
-- Snap the bomb into Mario's hold state variables safely
m.heldObj = bomb
bomb.oHeldState = HELD_HELD

-- Inject forward speed vectors relative to Mario's current direction
bomb.oForwardVel = 40.0
bomb.oVelY = 15.0
bomb.oMoveAngleYaw = m.faceAngle.y

-- Break attachment immediately to throw it
bomb.oHeldState = HELD_THROWN
m.heldObj = nil

-- Play Mario's visual punching/throwing motion
set_mario_action(m, ACT_PUNCHING, 0)

-- Set a 15-frame cooldown (approx 0.5 seconds)
bomb_cooldown = 15
end
end
end
end

-- Hooking directly into HOOK_MARIO_UPDATE completely fixes the gMarioStates reference error
hook_event(HOOK_MARIO_UPDATE, throw_bomb_update)
 

Users who are viewing this thread