Hi, Is it possible to make non-spinable charaters spinable?

Allaxa

Member
Im making this thread to ask anyone if its actually possible to make non spinning characters spin, cause I saw someone make alt amy animations and was wondering if its possible
Post automatically merged:

I meant for me to make them, sorry
 
Well,you would have to see the SRB2 Wiki.The answears can be there in the Editing section.But yea,its possible to make them spin.You just have to be a good modder.
 
I already made for you a spinability script! Input it inside a lua script code:
Spinable players is real:
addHook("SpinSpecial", do
    for player in players.iterate
        if player.mo == nil then continue end
        if not (player.exiting)  //Obvious... If you are about to quit a level due an exit to tally you must not be able to spin anymore
        and P_IsObjectOnGround(player.mo) //Must stay on the ground
        and not (player.pflags & PF_STARTDASH) //Also don't activate spinning mode if the player is on spin dash mode...
        and not (player.pflags & PF_SPINNING) //Will activate the lua script if he is not on spinning mode already
        and (not player.powers[pw_nocontrol] or not (player.pflags & PF_FULLSTASIS)) //The conditions for spinning is whether if that player is not on nocontrol nor what disallows him to move or jump
        and not player.powers[pw_carry] // Not being carried for an example: Minecraft
        and not (player.pflags & PF_SLIDING) // Not being slided via waterslide or currents
        //Try changing the hard speed to low... if you like early spinning mode. Behind the *FRACUNIT is the value you would be able to rechange the speed value
        and player.speed >= 23*FRACUNIT
        
            player.pflags = $1|PF_SPINNING  //Gives the spinning flags, which makes the player actually on spinning
            S_StartSound(player.mo, sfx_spin) //Starting a noise: Spinning
            player.mo.state = S_PLAY_ROLL    //Makes the player on spinning animation. ROLL sprites must be existing on the skin's definition
        end
    end
end)

Sorry if im rude,but i already explained it.
For an example if I'm not being rude either... I specified for them a way to learn how to create a player spinable through Lua, as far as I know so...
 
For an example if I'm not being rude either... I specified for them a way to learn how to create a player spinable through Lua, as far as I know so...
Its ok,i think we were both rude to each other.
 
Panda, is it possible to remove her/his abilities if he/she has some and make the character spin when jumping?
Post automatically merged:

*A characters abilities i mean
 
Oh you can basically plan for your character anything to do: You can remove his or her abilities on any condition or any way set by you. And yes you can make the player spin whilst jumping... Just remove the and P_IsObjectOnGround(player.mo) //Must stay on the ground line to make it possible
 
and P_IsObjectOnGround(player.mo) //Must stay on the ground I dont see that
Post automatically merged:

Here's an example of the character im using: Kanade
Post automatically merged:

Say i wanted to remove her abilities, and make her spin jumpable, how do i do that?
 
Because you've asked to remove the abilties completely then, you will need to edit this character's wad/pk3 and find the S_SKIN file, which is the character's skin file inforomation definition.
SPOILER_unknown.png

Find the strings ability and set it to zero so she can't perform any ability. As well as ability2. But since you asked this character to be spinable then set ability2 to 1
 
Because you've asked to remove the abilties completely then, you will need to edit this character's wad/pk3 and find the S_SKIN file, which is the character's skin file inforomation definition.
SPOILER_unknown.png

Find the strings ability and set it to zero so she can't perform any ability. As well as ability2. But since you asked this character to be spinable then set ability2 to 1
Well since Im on Android, It didn't work for me, I opened the game and it didn't work, How could you make it work?
 
What about honey?
Post automatically merged:

I also want her to he spinable
Post automatically merged:

*her
 
This is a fairly simple change once you get the very basics of Lua down. All you gotta do is change the player.charability and playercharflags values. Add or remove as many skin checks as you want.

LUA_EASY.lua:
--Simple character flag Lua edit. Everything behind a "--" is a comment that SRB2 will ignore.

addHook("PlayerThink", function(p) --I'll shorten "player" to just p for convenience.
    if p.mo --Does our player mobj exist? (Not spectating or a dedicated server player who doesn't control a character)
    local s = p.mo --Let's call the actual player object "s" for convenience. Saves me from having to type out p.mo all the time.
        if (s.skin == "honey" or s.skin == "amy" or s.skin == "whoeverelseyoulike") --Only apply our code to these characters
        p.charflags = $ & ~SF_NOJUMPSPIN & ~SF_NOJUMPDAMAGE --Google for S_SKIN SRB2 and you'll find all the usable flags on the SRB2 wiki.
        p.charability = CA_NONE --You can turn this into CA_DOUBLEJUMP if you want a double jump, for example.
        p.charability2 = CA2_SPINDASH --Make this CA2_NONE if you want no secondary ability at all. 
        end 
    end
end)

--If you want more values to play with, google SRB2 userdata and scroll down to the player_t section. 
--You can add p.normalspeed = 50*FRACUNIT to make them faster, for example.
 
I can do that... If you need more modded spinable characters then there's no reason thread it here... I just change the character ability stuff to make it spinable and give it to you at Discord
 

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

Back
Top