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

feat: new Math triggers (Clamp, Sign, Atan2, Rad, Deg, Lerp) and char triggers (Angle, Scale, OffSet, Alpha) #1275

Closed
wants to merge 7 commits into from

Conversation

Wftk
Copy link
Contributor

@Wftk Wftk commented Jun 9, 2023

  • fix: Rgba sprites mask inverse when palfx invertall = 1.
    Before fix:
    ikemen001
    After fix:
    ikemen002
    Char link

New Math triggers:

  • Clamp(x,min,max) (float)
    Return a value clamped to an inclusive range of two specified numbers

  • Sign(value) (int)
    Returns the sign of a real number. If value < 0 return -1. If value 0 return 0. if value > 0 return 1.

  • Atan2(x,y) (float)
    Returns the arc tangent of the two numbers x and y.

  • Rad(value) (float)
    Converts degress to radians.

  • Deg(value) (float)
    Converts radians to degress.

  • Lerp(a,b,amount) (float)
    Linear interpolation between two values.

New Char triggers:

  • Angle (float)
    Gets the value of the player's angle.
    Example: "trigger1 = angle < 90"
  • Scale (float) (Arguments x, y)
    Gets the value of the player's scale.
    Example: "trigger1 = scale x< 2 || scale y > 2"
  • OffSet (float) (Arguments x, y)
    Gets the value of the player's offset.
    Example: "trigger1 = offset x > 20 || offset y > 15"
  • Alpha (int) (Arguments source, dest)
    Gets the value of the player's alpha.
    Example: "trigger1 = alpha source > 128 || alpha dest < 64"

@github-actions github-actions bot added the PR: feat This PR implements a new feature label Jun 9, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Jun 9, 2023
@K4thos K4thos added the target: minor This PR is targeted for the next minor release label Jun 10, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Jun 10, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Jul 4, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Jul 6, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Jul 18, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Jul 18, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Aug 6, 2023
@github-actions github-actions bot added the PR: feat This PR implements a new feature label Aug 6, 2023
@K4thos K4thos changed the title feat: Math and Char triggers feat: new Math triggers (Clamp, Sign, Atan2, Rad, Deg, Lerp) and char triggers (Angle, Scale, OffSet, Alpha) Aug 6, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Aug 6, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Aug 6, 2023
@K4thos
Copy link
Member

K4thos commented Aug 6, 2023

some changes before the PR can be merged:

  1. These should be changed to OC_ex variants:
    OC_angle
    OC_scale_x
    OC_scale_y
    OC_offset_x
    OC_offset_y
    OC_alpha_s
    OC_alpha_d

  2. script.go references every single existing trigger, even if adding them is not needed because of exisitng lua variants (in such case they should be added as comments). Following triggers are missing in script.go:
    atan2
    clamp
    deg
    lerp
    rad
    sign

  3. In script.go the function is named offsetDest instead of alphaDest.

  4. Please keep the alphabetical order when adding new functions to that file, let's keep the existing conventions

@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Aug 7, 2023
@github-actions github-actions bot added PR: feat This PR implements a new feature and removed PR: feat This PR implements a new feature labels Aug 7, 2023
@K4thos K4thos changed the base branch from master to develop November 1, 2023 11:43
@K4thos
Copy link
Member

K4thos commented Nov 1, 2023

This branch has conflicts that must be resolved

@Wftk Wftk closed this Nov 1, 2023
@Wftk Wftk deleted the Triggers branch November 1, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feat This PR implements a new feature target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants