DMC-Style Air Hike SFX - suggestions?

Gubei

Member
Hi! I'm setting up a custom character for a friend, and it's my first actual coding project and, naturally, my first SRB2 character.

He has a Devil May Cry-Style Air Hike/double jump.
srb20005.gif

I wanted to add a glyph underneath him, something akin to Nero's in DMC4 (you can find the gif of it on this wiki page) (sorry about linking to fandom wiki)

Is there a way to spawn some kind of 3d object underneath him that looks like a flat glyph floating in the air, or should I just handle it with sprites? Either approach works, but if there's a way to spawn a 3d plane in lua scripting, that'd be neat.
 
Hi! I'm setting up a custom character for a friend, and it's my first actual coding project and, naturally, my first SRB2 character.

He has a Devil May Cry-Style Air Hike/double jump.
View attachment 146656
I wanted to add a glyph underneath him, something akin to Nero's in DMC4 (you can find the gif of it on this wiki page) (sorry about linking to fandom wiki)

Is there a way to spawn some kind of 3d object underneath him that looks like a flat glyph floating in the air, or should I just handle it with sprites? Either approach works, but if there's a way to spawn a 3d plane in lua scripting, that'd be neat.

Here it is. This custom function spawns a 3D flat object with blending that adjusts to its owner's color and vanishes.
DMC_SpawnGlyphFromMobj:
rawset(_G, "DMC_SpawnGlyphFromMobj", function(mobj, sprite, frame)
    if not (mobj and mobj.valid)
        return
    end
    if not frame
        frame = A
    end
    if not sprite
        sprite = SPR_THOK
        frame = A
    end

    local glyph = P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_THOK)
    glyph.sprite = sprite
    glyph.frame = frame|FF_FULLBRIGHT
    glyph.angle = mobj.angle
    glyph.scale = mobj.scale*3
    glyph.color = SKINCOLOR_SAPPHIRE
    if mobj.color
        glyph.color = mobj.color
    end
    glyph.colorized = true
    glyph.renderflags = RF_FLOORSPRITE
    glyph.blendmode = AST_ADD
end)



Usage:
DMC_SpawnGlyphFromMobj(object, sprite, frame)
In this case, object is player.mo.
sprite is the sprite you'll select.
frame is the frame of sprite the glyph will use.



Hasn't tested it, but it should do the trick.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top