Jump to content

Looking for help in coding


Recommended Posts

Okay, basically what I want to do is make it so that the speed modifiers don't affect or barely affect a character that I have.

I tried this; 

local function onbecamehuman(inst)
    -- Set speed when not a ghost (optional)
    inst.components.locomotor:SetExternalSpeedMultiplier(inst, "crique_speed_mod", .8)
    
    if inst.components.locomotor.speed = < .8 then 
        inst.components.locomotor:SetExternalSpeedMultiplier(inst, "crique_speed_mod", .8)
    end
end

But it didn't really do anything for me. I'm also just trying to understand coding altogether.

Any and all help is much appreciated.

Link to comment
Share on other sites

At the moment I've gotten something that feels like progress? 

local function  onload(inst)
    if inst.components.locomotor.speed < .8 then 
        inst.components.locomotor:SetExternalSpeedMultiplier(inst, "crique_speed_mod", .8)
end 
end 
 

Link to comment
Share on other sites

You mean you don't want a character to be affected by, say, spider creep right? 

I believe the code you're looking for is simply:

            inst.components.locomotor:EnableGroundSpeedMultiplier(false)

Link to comment
Share on other sites

8 hours ago, Mr. Tiddles said:

You mean you don't want a character to be affected by, say, spider creep right? 

I believe the code you're looking for is simply:

            inst.components.locomotor:EnableGroundSpeedMultiplier(false)

Actually, no, I do want him to be affected by the spider creep. I don't want my character to be affected by the speed nerf that you get when wearing marble armor, piggyback skin, or when carrying suspicious marble or other marble statues. I appreciate the reply, though!

Link to comment
Share on other sites

Ah, gotcha! I'll see if there's anything around the equippable function that might shed some light.

 

EDIT: After looking into it, I realize this is a Together mod? Sadly I can't be much help there, then. At least not at this hour.

 

 

Link to comment
Share on other sites

33 minutes ago, Mr. Tiddles said:

Ah, gotcha! I'll see if there's anything around the equippable function that might shed some light.

 

EDIT: After looking into it, I realize this is a Together mod? Sadly I can't be much help there, then. At least not at this hour.

 

 

Ah, damn. Well, there's one thing I definitely need help with; My character's name isn't showing up above their head in the game. Do you know how to fix this?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...