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

Add trigger_changevalue from svencoop #227

Open
SaintWish opened this issue Nov 3, 2023 · 0 comments
Open

Add trigger_changevalue from svencoop #227

SaintWish opened this issue Nov 3, 2023 · 0 comments
Labels
enhancement 🔧 New feature or request good first issue Good for newcomers med priority Issue that should be addressed as time allows.

Comments

@SaintWish
Copy link
Contributor

The FGD content to help explain what it should do.

// Change any entity keyvalue during runtime, allows set, basic arithmetic operations and bitwise logical operations (useful for flags)
@PointClass base(Targetname) color(90 215 60) = trigger_changevalue : "Trigger Change Value"
[
    spawnflags(Flags) =
    [

        // For Vectors:
        1 : "Don't use X" : 0
        2 : "Don't use Y" : 0
        4 : "Don't use Z" : 0

        32 : "Invert target value" : 0
        64 : "Invert source value" : 0

    ]
    target(target_destination) : "Destination entity"
    m_iszValueName(string) : "Destination key"
    m_iszNewValue(string) : "Source value"
    m_iszValueType(choices) : "Action" :  0 =
    [
        0 : "Replace (= source)"
        1 : "Add (= old + source)"
        2 : "Mul (= old * source)"
        3 : "Sub (= old - source)"
        4 : "Div (= old / source)"
        16 : "Pow (= old ^ source)"
        12 : "Mod (= old % source)"
        5 : "AND (= old & source)"
        6 : "OR (= old | source)"
        13 : "XOR (= old ^ source)"
        7 : "NAND (= !(old & source))"
        8 : "NOR (= !(old | source))"
        14 : "NXOR (= !(old ^ source))"
        11 : "Append (String concatenation)"
        17 : "Sin (= sin(source))"
        18 : "Cos (= cos(source))"
        19 : "Tan (= tan(source))"
        23 : "Cot (= cot(source))"
        20 : "Arcsin (= arcsin(source))"
        21 : "Arccos (= arccos(source))"
        22 : "Arctan (= arctan(source))"
        24 : "Arccot (= arccot(source))"
    ]
    m_trigonometricBehaviour(choices) : "Trigonometric funcs. I/O" : 0 =
    [
        0 : "Degrees in (out for arc.)"
        1 : "Radian measure in (out for arc.)"
    ]
    m_iAppendSpaces(integer) : "Append spaces (for strings)" : 0
    message(target_destination) : "Trigger after action"
]
@SaintWish SaintWish added enhancement 🔧 New feature or request med priority Issue that should be addressed as time allows. labels Aug 29, 2024
@SaintWish SaintWish added the good first issue Good for newcomers label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔧 New feature or request good first issue Good for newcomers med priority Issue that should be addressed as time allows.
Projects
None yet
Development

No branches or pull requests

1 participant