NO MOM
I CANT PAUSE.
Scientific Number Tools Documentation
Support
Browse documentation

Components and replication

Own a numeric value, observe changes and validate server authority.

On this page

Normal component

Add Scientific Number Value Component to an Actor Blueprint. Use its Try Set Value, Try Add, Try Subtract and Get Value methods. Bind On Value Changed to refresh your interface. Successful operations that leave the value unchanged do not invent a change event.

Safe component

Add Scientific Number Safe Value Component for authenticated ownership. Test it during Play so its component initialization has run. Set 100, spend 25, then try dividing by zero.

Expected result

The Safe component retains 75. Division returns False and DivisionByZero. Read through Try Get Value; a rejected operation must not overwrite the previous balance.

Calling a mutation on an uninitialized Safe component outside gameplay is not equivalent to BeginPlay. Use its supported initialization path for nonstandard lifecycles and check the returned result.

Replicate the Normal value

  1. In the owning Actor’s Class Defaults, enable Replicates. For a small test actor with no pawn/view relevance, enable Always Relevant as well.
  2. From BeginPlay, use Switch Has Authority. On Authority, set the Normal component to 125. Do not execute that setter on the remote branch.
  3. On the client, display Get Value after replication arrives or in On Value Changed.
  4. Run two players as a listen server and client. Repeat with a dedicated server and distinct processes.
Expected result

Both sides display 125, although only the server called the setter. A client-local change does not authorize or apply a purchase on the server.

Normal replicates its value and raises On Value Changed on receiving clients. Safe components do not automatically replicate their protected state. Define your game’s RPCs and authorization separately; clients should request an action, not supply the balance the server must trust.

No Mom I Cant Pause · Contact support · Discord

Scientific Number Tools 1.0.0 · Source documentation ·