[Doc] Assignment operators

Post Reply
User avatar
Raddeck
LP Manager
Reactions: 1
Posts: 508
Joined: Sat Oct 16, 2021 6:22 pm
Location: LpWorld
Contact:

Post by Raddeck »

Assignment operators are used to modify the values of float variables and stats.

They are:
+= : add
-= : deduct
*= : multiply
/= : divide
= : set (for a float variable)
=> : set (for a actor stat)


Examples:

Code: Select all

    CurrentCompanion:attractiontoplayer += Random(0, 2)
    count += 1
    martial *= 2
    Salary /= 2
    jobperformance => 50 // use '=>' instead of just '=' because job performance is a actor stat
    count = 0 // use '=' instead of '=>' because count is not an actor stat but a local float variable
    count += 1
Like my work? Buy me a coffee or support me on Patreon to keep it coming. :ugeek:
-Don't PM me for support-
Top
Post Reply