Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a calculator for movement speed #26

Open
Tera458 opened this issue May 26, 2023 · 2 comments
Open

Make a calculator for movement speed #26

Tera458 opened this issue May 26, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@Tera458
Copy link
Collaborator

Tera458 commented May 26, 2023

No description provided.

@Tera458 Tera458 added the Module label May 26, 2023
@github-project-automation github-project-automation bot moved this to Todo in Wiki May 26, 2023
@github-actions github-actions bot added this to the Module milestone May 26, 2023
@naomieow
Copy link
Collaborator

naomieow commented May 26, 2023

Take $M_a$ as our starting movement speed attribute and $M_f$ as our final product, I believe the following equation will give the final speed attribute. Conversion to $\text{ms}^{-1}$ is still beyond me as of right now.

$$ M_{f}=\left(M_{a}+\sum{a_{\text{add}}}\right)\times\left(1+\sum{b_{\text{multiplyBase}}}\right)\times\left(\prod({c_{\text{multiply}}+1})\right) $$

@catter1 catter1 removed their assignment May 26, 2023
@naomieow
Copy link
Collaborator

A lua implementation of the equation in my previous comment:

function calc_movement(base, add, multiplyBase, multiply)
    total = base
    for i = 1, #add do
        total = total + add[i]
    end
    
    mbTotal = 1
    for i = 1, #multiplyBase do
        mbTotal = mbTotal + multiplyBase[i]
    end
    total = total * mbTotal
    
    mTotal = 1
    for i = 1, #multiply do
        mTotal = mTotal * (multiply[i] + 1)
    end
    
    total = total * mTotal
    
    return total
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

3 participants