Skip to content

All Nodes

Dynamic Nodes

Nodes in this category can change their ports depending on the option that you pick from the node's selection menu.

Operator

The Operator Node takes in the values from its Input Ports, A and B, processes them depending on the chosen operator, and outputs the resulting value into the Result Output Port. The operations that can be chosen are listed below.

Numbers

Add

Returns the sum of the inputs A and B.

Example:
A = 5; B = 10
Result = 15

Number Add Node

Subtract

Returns the difference between the inputs A and B.

Example:
A = 5; B = 10
Result = -5

Number Subtract Node

Multiply

Returns the product of the inputs A and B.

Example:
A = 5; B = 10
Result = 50

Number Multiply Node

Divide

Returns the quotient between the inputs A and B. Note that if the divisor, B, is 0, this operation will cause an error.

Example:
A = 5; B = 10
Result = 0.5

Number Divide Node

Power

Returns the result of raising the input A to the power of input B.

Example:
A = 5; B = 10
Result = 9765625

Number Power Node

Modulo

Returns the remainder of the division between inputs A and B.

Examples:
A = 5; B = 2
Result = 1

A = -5; B = 2
Result = 1

A = 5; B = -2
Result = -1

A = -5; B = -2
Result = -1

Number Modulo Node

Divide and Floor

Calculates the quotient between inputs A and B, and returns the floor (next lower integer) of the quotient.

Examples:
A = 7; B = 3
Result = 2

A = 3.14; B = 1.62
Result = 1

Number Divide And Floor Node

Note: Temporarily, the symbol for Divide and Floor Node is the same as Divide Node. This will be fixed in the future.

Strings

Concat

Joins the string inputs A and B together into one and returns the joined string. Note that strings joined this way won't automatically have a space between the strings.

Example:
A = "Hello,"; B = "World!"
Result = "Hello,World!"

String Concat Node

Booleans

And

Returns the boolean value of true if both inputs A and B are true, and false otherwise.

Examples:
A = true; B = true
Result = true

A = true; B = false
Result = false

Boolean And Node

Or

Returns the boolean value of true if at least one among the inputs A and B are true, and false otherwise.

Examples:
A = true; B = false
Result = true

A = false; B = false
Result = false

Boolean Or Node

Comparator

The Comparator Node takes in the values from its Input Ports, A and B, processes them depending on the chosen comparator, and outputs either true or false into the Result Output Port. The operations that can be chosen are listed below.

Numbers

Greater

Compares input A from input B and returns true if A is greater than B; returns false otherwise.

Examples:
A = 2; B = 1
Result = true

A = 1; B = 1
Result = false

Number Greater Node

Lower

Compares input A from input B and returns true if A is less than B; returns false otherwise.

Examples:
A = 1; B = 2
Result = true

A = 2; B = 2
Result = false

Number lower Node

Greater Or Equal

Compares input A from input B and returns true if A is greater than or equal to B; returns false otherwise.

Examples:
A = 2; B = 1
Result = true

A = 1; B = 1
Result = true

A = 0; B = 1
Result = false

Number Greater Or Equal Node

Lower Or Equal

Compares input A from input B and returns true if A is less than or equal to B; returns false otherwise.

Examples:
A = 1; B = 2
Result = true

A = 2; B = 2
Result = true

A = 3; B = 2
Result = false

Number Lower Or Equal Node

Equal

Compares input A from input B and returns true if A is exactly equal to B; returns false otherwise.

Examples:
A = 1; B = 1
Result = true

A = 1.00001; B = 1
Result = false

Number Equal Node

Not Equal

Compares input A from input B and returns true if A is not equal to B; returns false otherwise.

Examples:
A = 1; B = 1
Result = false

A = 1.00001; B = 1
Result = true

Number Not Equal Node

Strings

Equal

Compares input A from input B and returns true if A is equal, character by character, to B; returns false otherwise.

Examples:
A = "Hello"; B = "Hello"
Result = true

A = "Hello"; B = "hello"
Result = false

String Equal Node

Includes

Compares input A from input B and returns true if A has consecutive characters equal to B; returns false otherwise.

Examples:
A = "How are you?"; B = "are y"
Result = true

A = "How are you?"; B = "How are you?"
Result = true

A = "How are you?"; B = "ow Are"
Result = false

A = "How are you?"; B = "warey"
Result = false

String Includes Node

StartsWith

Compares input A from input B and returns true if A has starting characters equal to B; returns false otherwise.

Examples:
A = "How are you?"; B = "How are"
Result = true

A = "How are you?"; B = "How are you?"
Result = true

A = "How are you?"; B = "How Are"
Result = false

A = "How are you?"; B = "Howareyou?"
Result = false

String Starts With Node

EndsWith

Compares input A from input B and returns true if A has ending characters equal to B; returns false otherwise.

Examples:
A = "How are you?"; B = "are you?"
Result = true

A = "How are you?"; B = "How are you?"
Result = true

A = "How are you?"; B = "Are You?"
Result = false

A = "How are you?"; B = "Howareyou?"
Result = false

String Ends With Node

Documents

Equal

Compares input A from input B and returns true if the document GUIDs of both inputs A and B are equal.

Document Equal Node

Wait UserProperty

The Wait UserProperty Node evaluates the value of the selected User Property parameter and compares it to the value of the Value Input Port based on the chosen comparator. If this comparison returns true, the Event Exit Port is activated. Otherwise, the node simply waits until evaluated User Property value satisfies the specified comparison.

Note: When selecting the User Property parameter, the selected comparator will automatically update and select the most appropriate comparator based on the type of the User Property parameter: Wait Number > for numbers, Wait String == for strings, and Wait Bool for booleans.

Furthermore, the choice of selectable comparators will be limited based on the type of the User Property parameter.

Numbers

There are 6 different comparators for number-typed User Property parameters: greater, lower, greater or equal, lower or equal, equal, and not equal. These work the same as the Comparators for Numbers, where input A is the User Property value, and input B is the Value Input Port.

Wait User Property Number Greater Node

Strings

There are 2 different comparators for string-typed User Property parameters: equal and not equal.

Equal

Compares the User Property Value from input Value and returns true if the User Property Value is equal, character by character, to Value; returns false otherwise.

Wait User Property String Equal Node

Not Equal

Compares the User Property Value from input Value and returns true if the User Property Value is not equal, character by character, to Value; returns false otherwise.

Wait User Property String Not Equal Node

Booleans

There is only 1 choice of comparator for boolean-typed User Property parameters: equal.

Equal

Compares the User Property Value from input Value and returns true if the User Property Value and Value is both true or both false; returns false otherwise.

Wait User Property Boolean Equal Node

Wait Item Count

The Wait Item Count Node checks how many of the selected Item is in the end user's inventory, and compares it to the value of the Value Input Port based on the chosen comparator. If this comparison returns true, the Event Exit Port is activated. Otherwise, the node simply waits until the Item count satisfies the specified comparison.

Comparators

Since the Item count is a number, there are 6 different comparators for it: greater, lower, greater or equal, lower or equal, equal, and not equal. These work the same as the Comparators for Numbers, where input A is the Item count, and input B is the Value Input Port.

Wait Item Count Greater Node

Numbers: Range Nodes

Clamp

The Clamp Node takes in the input Value and keeps it between the the input Min and input Max values. If the Value is less than the Min value, the Min value is returned. If the Value is greater than the Max value, the Max value is returned. Otherwise, the Value is returned into the output Result.

This can be useful for limiting the Value within some common value ranges such as 0 to 1 or 0 to 100.

Examples:
Value = 0.3; Min = 0; Max = 1
Result = 0.3

Value = 150; Min = 0; Max = 100
Result = 100

Value = -10; Min = 0; Max = 64
Result = 0

Clamp Node

Is In Range (Inclusive)

The Is In Range (Inclusive) Node takes in the input Value and returns true if both these conditions are satisfied:

  • Value is greater or equal to the input Min value
  • Value is lower or equal to the input Max value

Otherwise, the boolean value false is returned into the output Result.

Examples:
Value = 0.3; Min = 0; Max = 1
Result = true

Value = 100; Min = 0; Max = 100
Result = true

Value = 0; Min = 0; Max = 64
Result = true

Value = 150; Min = 0; Max = 100
Result = false

Value = -10; Min = 0; Max = 64
Result = false

Is In Range Inclusive Node

Is In Range (Exclusive)

The Is In Range (Exclusive) Node takes in the input Value and returns true if both these conditions are satisfied:

  • Value is greater than the input Min value
  • Value is lower than the input Max value

Otherwise, the boolean value false is returned into the output Result.

Examples:
Value = 0.3; Min = 0; Max = 1
Result = true

Value = 100; Min = 0; Max = 100
Result = false

Value = 0; Min = 0; Max = 64
Result = false

Value = 150; Min = 0; Max = 100
Result = false

Value = -10; Min = 0; Max = 64
Result = false

Is In Range Exclusive Node

MRound (Multiple Round)

The MRound Node takes in the input Value, rounds it to the nearest multiple of the input Multiplier value, and returns this value into the output Result.

Examples:
Value = 16; Multiplier = 3
Result = 15

Value = 5; Multiplier = 2
Result = 6

MRound Node

Random Int

The Random Int Node takes in the inputs Min and Max, and generates an integer within the range of Min and Max values. Min specifies the inclusive lower bound of the range, while Max specifies the exclusive upper bound of the range. The value generated is returned into the output Result.

Examples:
Min = 0; Max = 100
Result = 15

Min = 0; Max = 100
Result = 0

Min = 0; Max = 100
Result = 99

Random Int Node

Random Float

The Random Float Node generates a float value within 0 and 1, where 0 is inclusive and 1 is exclusive. The value generated is returned into the output Result.

Random Float Node

Converter Nodes

String To Number

The String To Number Node takes in the input Value, converts it from String type to Decimal type using Convert.ToDecimal(), and outputs the converted value to the output Result.

String To Number Node

Logic: Branch Nodes

Nodes within this section have direct control over the Control Flow of the Script; they can redirect the flow paths into different branches depending on the input values given to them.

Branch

The Branch Node works exactly like If statements in other programming languages. This node takes the Control Flow entering through the Enter port and redirects it to either the True or False exit ports depending on the boolean value of the input Value. If Value is true, the Control Flow is redirected to the True exit port; otherwise, it is instead redirected to the False exit port.

Branch Node

Switch

The Switch Node works exactly like Switch/Case statements in other programming languages. This node reads the number value from the input Value port and compares it to the other input Case_# ports. If Value equals one of the Case_# number values, this node will take the Control Flow entering through the Enter port and redirect it to the Exit port connected to the equaling Case_# port. If Value does not equal any of the Case_# number values, the Control Flow is instead redirected to the Default exit port.

More cases can be added by clicking on the + Add button on the node. To delete a case, simply hover over the case you'd like to delete and click on the button with the minus symbol.

Switch Node

Switch String

The Switch String Node works exactly like Switch/Case statements in other programming languages and the Switch Node above. However, this node works with String types instead of Number types. This node reads the string value from the input Value port and compares it to the other input Case_# ports. If Value equals one of the Case_# string values, this node will take the Control Flow entering through the Enter port and redirect it to the Exit port connected to the equaling Case_# port. If Value does not equal any of theCase_# string values, the Control Flow is instead redirected to the Default exit port.

More cases can be added by clicking on the + Add button on the node. To delete a case, simply hover over the case you'd like to delete and click on the button with the minus symbol.

Switch String Node

Logic: Boolean Nodes

Not

The Not Node takes in the boolean value passed into the input Bool Value, inverts this boolean value, and returns this inverted value to the output Not port. If the Bool Value is true, the inverted value returned is false. Otherwise, the inverted value returned is true.

Examples:
Bool Value = true
Not = false

Bool Value = false
Not = true

Not Node

Logic: Loop Nodes

Repeat

The Repeat Node takes in an input Iterations number and for each iteration, the Control Flow is passed to the Body exit port, and the current iteration number is returned through the Index output port. The Index returned will be from 0 to the number of iterations minus one. For example, if the Iterations is 10, the Index returned will be from 0 to 9.

Once the node is done repeating based on the number of iterations, the Control Flow is then passed to the Exit port.

Repeat Node

User Profile Nodes

Nodes within this section work directly with the User Profile and can either retrieve values from or update values into the User Profile.

AB Test

The AB Test Node works directly with the A/B Tests created within the A/B Tests section of LiveOps. Before working with this node, first make sure that you have an A/B Test created. Once you have an A/B Test you can use, select it by clicking on the Select ABTest... button on the node and choose the A/B Test you would like to use. The test groups of chosen A/B Test should automatically be shown, along with their connected Exit ports.

This node runs the Exit_# port connected to the test group that the end user is currently in. If the end user is not in any one of the test groups, the ExitDefault port runs instead.

Upon stopping the A/B Test, choosing a test group as the best, and applying all the changes, the AB Test nodes referencing this A/B Test, along with any of their connected links, will be deleted. A link will then be created between the port connected to the AB Test's Enter port and the port connected to the chosen test group's Exit_# port.

AB Test Node

Segmentation

The Segmentation Node works directly with the Segments created within the Segmentation section of LiveOps. Before working with this node, first make sure that you have a Segment created. Once you have a Segment you can use, first click the + Add button and select it by clicking on the Select Segment... button on the node and choose the Segment you would like to use.

This node runs the Exit_# port connected to the Segment that the end user is currently in. If the end user is not in any one of the Segments, the ExitDefault port runs instead.

More Segments can be added by clicking on the + Add button on the node. To delete a Segment, simply hover over the case you'd like to delete and click on the button with the minus symbol.

Segmentation Node

Get UserProperty

The Get UserProperty Node is used to directly retrieve values from the User Profile. To select the User Profile parameter you'd like to retrieve the value from, simply click on the Select Item... button on the node. This will show all the parameters within Default and System Profiles, and within any custom SmartObjects you have created. Check out the Smart Objects section for more info.

Once the User Profile parameter is chosen, the value is returned through the output Result port. Note that the Result port is typed as Object, which means it can return any types of values and can be connected to any type of value ports. Make sure to check if the type of the value retrieved from the User Profile is compatible with the type of the value port you want to connect this Result port to.

Tip: The type of the value of the parameter from the User Profile can be checked in the selection menu of all the available User Profile parameters upon clicking on the Select Item... button on the node. Types surrounded by brackets [ ] signifies that this is a List of this type. For example, the type [Integer] means this User Profile parameter will return a List of Integers instead of a single Integer.

Below are nodes that retrieve values from specific User Profile parameters and are created for convenience.

Get UserProperty Node

Get Playtime

Returns the User Profile parameter System ▸ General Info ▸ Play Time (Integer).

Get Playtime Node

Get Time Since Install

Returns the User Profile parameter System ▸ General Info ▸ Time Since Install Passed (Integer).

Get Time Since Install Node

Total Spend

Returns the User Profile parameter System ▸ Payments ▸ Total Spend (Float).

Total Spend Node

Max Pay

Returns the User Profile parameter System ▸ Payments ▸ Max Payment (Float).

Max Pay Node

Last Pay Time

Returns the User Profile parameter System ▸ Payments ▸ Last Payment Time (Integer).

Last Pay Time Node

Set UserProperty

The Set UserProperty Node is used to directly set a value to the User Profile. To select the User Profile parameter you'd like to set the value for, simply click on the Select Item... button on the node. This will show all the parameters within Default and System Profiles, and within any custom SmartObjects you have created. Check out the Smart Objects section for more info.

Once the User Profile parameter is chosen, the value passed into the input Value port will be set into the User Profile parameter when this node activates. Note that the Value port is typed as Object, which means it can accept any types of values and can be connected to any type of value ports. Make sure to check if the type of the value port you want to connect this Value port to is compatible with the type of the value that the selected User Profile parameter accepts. Check the tip under the Get UserProperty Node section for more details.

Set UserProperty Node

On UserProperty Changed

The On UserProperty Changed Node is an Event Node that notifies the connected node if the value of the selected User Profile parameter has changed. To select the User Profile parameter you'd like to be notified for, simply click on the Select Item... button on the node. This will show all the parameters within Default and System Profiles, and within any custom SmartObjects you have created. Check out the Smart Objects section for more info.

Once the User Profile parameter is chosen, this node runs the Event exit port when the value of the User Profile parameter has changed.

On UserProperty Changed Node

On Hard Purchase

The On Hard Purchase Node is an Event Node that notifies the connected node if the end user has made a purchase using hard or real currency. Once a hard purchase is made by the end user, this node runs the Event exit port.

This node also has some output ports that provide some information about the purchase. These output ports are:

  • Id - The document id of the item purchased. The document can either be a Game Offer or a Store Item.
  • ProductId - The id of the product related to the item purchased. The list of products can be found in Products page.
  • Price - The amount of hard currency paid in USD.
  • Multiplier - How much the provided resources should be multiplied. This depends on either the multiplier set on the In-Game Store for certain Store Items, or in the User Profile parameter System ▸ Payments ▸ Resources Multiplier (Float).
  • Session - The end user's session number when this purchase was made. This could be found in the User Profile parameter System ▸ General Info ▸ Session (Integer).
  • TimeStamp - The time the purchase was made in Unix seconds.

Note: These output ports can be shown by clicking on the Add + button on the node and selecting the port you'd like to expose. Upon reloading the Script, if the port is not connected to anything, the port will automatically be hidden.

On Hard Purchase Node

On Soft Purchase

The On Soft Purchase Node is an Event Node that notifies the connected node if the end user has made a purchase using soft or virtual currency. Once a soft purchase is made by the end user, this node runs the Event exit port.

This node also has some output ports that provide some information about the purchase. These output ports are:

  • Id - The document id of the item purchased. The document can either be a Game Offer or a Store Item.
  • Price - The document id of the price. This price can be set on the Store Item documents.
  • Multiplier - How much the provided resources should be multiplied. This depends on either the multiplier set on the In-Game Store for certain Store Items, or in the User Profile parameter System ▸ Payments ▸ Resources Multiplier (Float).
  • Session - The end user's session number when this purchase was made. This could be found in the User Profile parameter System ▸ General Info ▸ Session (Integer).
  • TimeStamp - The time the purchase was made in Unix seconds.

Note: These output ports can be shown by clicking on the Add + button on the node and selecting the port you'd like to expose. Upon reloading the Script, if the port is not connected to anything, the port will automatically be hidden.

On Soft Purchase Node

Wait Since Last Purchase

The Wait Since Last Purchase Node is an Event Node that notifies the connected node when the specified duration has passed since the end user's last purchase. Once the duration specified in the input Value port has passed, this node runs the Event exit port.

Wait Since Last Purchase Node

On Item Purchased

The On Item Purchased Node is an Event Node that notifies the connected node when the specified item has been purchased by the end user. To select the item you'd like to be notified for, simply click on the Select Item... button on the node. This will let you choose the template and document to be notified for. Only Store Items should be chosen in this field.

Once the item specified in the input Id port has been purchased, this node runs the Event exit port.

On Item Purchased Node

Was Item Purchased

The Was Item Purchased Node runs either the True or False exit ports depending on whether the selected Store Item has been purchased by the end user. To select the item you'd like to check for, simply click on the Select Store Item... button on the node. If the Store Item has been purchased, the True exit port is run; otherwise, the False exit port runs instead.

This node also has some output ports that provide some information about the purchase. These output ports are:

  • Price - The amount of hard currency paid in USD. If the purchase was made using soft currency, this price is instead set to 0.
  • TimeStamp - The time the purchase was made in Unix seconds.

  • ProductId - The id of the product related to the item purchased. If the purchase was made using soft currency, this productId is instead set to null. The list of products can be found in Products page.

  • Session - The end user's session number when this purchase was made. This could be found in the User Profile parameter System ▸ General Info ▸ Session (Integer).
  • Multiplier - How much the provided resources should be multiplied. This depends on either the multiplier set on the In-Game Store for certain Store Items, or in the User Profile parameter System ▸ Payments ▸ Resources Multiplier (Float).

Attachments can also be added to this node. Check out the Attachments section to learn more about this feature.

Was Item Purchased Node

List Nodes

Nodes within this section are for processing and manipulating lists of primitive types and objects.

Get Item At Index

The Get Item At Index Node takes in an input List and an input Index, retrieves the item stored in the given index position of the list, and returns this item through the output Item port. The list is 0-indexed, which means that the first item has the index of 0, the second has index 1, third has index 2, and so on.

If the index is not within the bounds of the list, an error is printed into the console.

Examples:
List = [ 1, 5, 2, 4 ]; Index = 0
Item = 1

List = [ 1, 5, 2, 4 ]; Index = 3
Item = 4

Get Item At Index Node

Get First Item

The Get First Item Node takes in an input List, retrieves the first item stored in the given index position of the list, and returns this item through the output Item port. If the list is empty and there is no first item found, an error is printed into the console.

Examples:
List = [ 1, 5, 2, 4 ]
Item = 1

Get First Item Node

Get Last Item

The Get Last Item Node takes in an input List, retrieves the last item stored in the given index position of the list, and returns this item through the output Item port. If the list is empty and there is no last item found, an error is printed into the console.

Examples:
List = [ 1, 5, 2, 4 ]
Item = 4

Get Last Item Node

Add Item

The Add Item Node takes in an input List, an input Item, and an input Index. Depending on the Index value, the Item value is inserted into the List at the given index. The list with the inserted item is then returned through the output Result port.

The list is 0-indexed, which means that the first item has the index of 0, the second has index 1, third has index 2, and so on. If the index given is -1, the item is added at the end of the list.

If the index given is a number other than -1, the item is inserted immediately to the left of the item currently positioned in the specified index, pushing all the items after it one index to the right. For example, if an item is inserted to index 3, the item that was previously at index 3 will now be at index 4, and the new item will have an index of 3. The length of the list is also increased by 1.

If the index is less than -1 or greater than the length of the list, an error is printed into the console.

Examples:
List = [ 1, 5, 2, 4 ]; Item = 3; Index = -1
Result = [ 1, 5, 2, 4, 3 ]

List = [ 1, 5, 2, 4 ]; Item = 3; Index = 0
Result = [ 3, 1, 5, 2, 4 ]

List = [ 1, 5, 2, 4 ]; Item = 3; Index = 2
Result = [ 1, 5, 3, 2, 4 ]

Add Item Node

Remove Item

The Remove Item Node takes in an input List and an input Index. Depending on the Index value, the item stored at the given index is removed. The list with the removed item is then returned through the output Result port.

The list is 0-indexed, which means that the first item has the index of 0, the second has index 1, third has index 2, and so on. The item at the given index is removed from the list, and all the items to the right of it will move to the left by one index. For example, if an item is at index 3, when this item is removed, the item that was previously at index 4 will now be at index 3, the item previously at index 5 will be at index 4, and so on. The length of the list is also decreased by 1.

If the index is less than 0 or greater or equal to the length of the list, an error is printed into the console.

Examples:
List = [ 1, 5, 2, 4 ]; Index = 0
Result = [ 5, 2, 4 ]

List = [ 1, 5, 2, 4 ]; Index = 2
Result = [ 1, 5, 4 ]

Remove Item Node

Create List

The Create List Node creates a new, empty list and returns the created list through the output Result port.

Create List Node

Clear List

The Clear List Node takes in an input List, deletes all items within this list, and returns the cleared list through the output Result port.

Clear List Node

Get Size

The Get Size Node takes in an input List and returns the count or length of this list through the output Count port.

Example:
List = [ 1, 5, 2, 4 ]
Count = 4

Get Size Node

For Each

The For Each Node takes in an input List and goes through each item in the list, one by one. For each of the items that this node goes through, the Control Flow is passed to the Body exit port, and values are returned through the Item, Index, and List output ports. The value returned through:

  • the output Item port is the current item
  • the output Index port is the current item's index
  • the output List port is the list's current state

Once the node is done going through all the items, the Control Flow is then passed to the Exit port.

For Each Node

List Contains?

The List Contains? Node takes in an input List and an input Element. If the element is found in the list, the boolean value true is returned; otherwise, the boolean value false is returned through the output Result port.

Examples:
List = [ 1, 5, 2, 4 ]; Element = 3
Result = false

List = [ 1, 5, 2, 4 ]; Element = 5
Result = true

List Contains? Node

Get Random Item

The Get Random Item Node takes in an input List, picks an item within this list randomly, and returns the picked item through the output Item port.

Examples:
List = [ 1, 5, 2, 4 ]
Item = 2

List = [ 1, 5, 2, 4 ]
Item = 4

Get Random Item Node

Inventory Nodes

Nodes within this section are for accessing and editing the end user's inventory. Check out the Inventory section for more info.

Get Item Count

The Get Item Count Node is useful for getting the current amount of the specified Item in the end user's inventories. This node will check all the inventory slots within the available inventory systems - Currencies and General Storage by default - and counts the amount of the specified Item in the inventories. This total amount is then passed to the output Count port.

Get Item Count Node

Add Items

The Add Items Node is useful for adding the specified Item into the end user's inventories. The value of the input Count port can also be used to specify how many of the Item should be added.

Note: The input Count port can neither be negative nor zero. If you wish to remove items from the inventory, please use the Remove Items node instead.

Add Items Node

Remove Items

The Remove Items Node is useful for removing the specified Item from the end user's inventories. The value of the input Count port can also be used to specify how many of the Item should be removed.

Note: The input Count port can neither be negative nor zero. If you wish to add items to the inventory, please use the Add Items node instead.

Remove Items Node

On Item Count Changed

The On Item Count Changed Node is an Event Node that notifies the connected node if the amount of the specified Item in the inventory has changed. To select the Item you'd like to be notified the changed amount for, simply click on the Select Item... button on the node. This will show all the documents of the Item template and its child templates. Check out the Offers & Items section for more info.

Once the Item is chosen, this node runs the Event exit port when the amount of the Item in the inventory has changed.

On Item Count Changed Node

Document Nodes

Nodes within this section are for retrieving and reading from Documents from tables. Note that these nodes cannot change the values stored in Documents in the tables during the runtime of the Script.

Get Document

The Get Document Node is useful for accessing a document and being able to use it in your Scripts. The node takes in an input Document, which can either be passed in through a connection from another node or selected by clicking the Select item... button, and passes that document to the output Result port.

This node can also be used to access a document's parameters. Once you have selected the template and document you'd like to use, simply click on the + Add button on the node. A Select item... button connected to an Object output port should show up. Select the document parameter you'd like to access and connect its output port to use the parameter's value.

Get Document Node

Find Document

The Find Document Node is useful for finding a document that has the specific parameter values you are looking for. First, select the template of the document you wish to look for; click on the Select item... button on the node to select the template. Once the template is selected, the document parameter you want to compare values to must be selected. The selected parameter's value for each document of the selected template will then be compared to the value passed into the input Value port. The first document to be found that has the parameter equal to the Value passed will be returned through the output Result port. Otherwise, a null will be returned.

Find Document Node

Create Document

The Create Document Node is useful for creating a temporary document of the specified template within your Scripts. To create a document, first select the template of the document you wish to create. Once you select a template, input ports representing the document parameters will be created. You can either manually specify what each of the document parameters' values should be, or you can pass in the values from other nodes. The created document will then be returned through the output Result port.

Note: The created document using this node is only temporary; it will not show up in the document tables or anywhere outside the Script.

Create Document Node

Time Nodes

Get Time Now

The Get Time Now Node returns the Admin Time (GMT+0) in Unix seconds.

Get Time Now Node

Time: Event Nodes

On Time Passed

The On Time Passed Node is an Event Node that notifies the connected node when the specified duration since the node has been activated has passed. Once the specified duration value from the input Value port has passed, this node runs the Event exit port.

On Time Passed Node

On PlayTime Passed

The On PlayTime Passed Node is an Event Node that notifies the connected node when the specified duration that the end user has spent in the game has passed. Once the specified duration value from the input Value port has passed, this node runs the Event exit port.

On Playtime Passed Node

Offer Nodes

Nodes within this section are for working directly with Game Offers and Game Offer Groups. Before using these nodes, please make sure that you have either Game Offers or Game Offer Groups created that you can work with. They can be created in the Offers & Items section of LiveOps.

Activate Offer

The Activate Offer Node takes in a Game Offer, activates it, and returns a unique instance id for this activated Game Offer through the output Id port. The node takes in a Game Offer either by selecting it by clicking on the Select Game Offer... button on the node or by connecting into the input Id port and passing the Game Offer from another node.

You don't have to first select a Game Offer using the Select Game Offer... button to be able to connect into the input Id port; you should be able to connect to this port and the node will automatically transform to show that it is taking in a Game Offer from another node.

There are two exit ports that get triggered depending on how the end user reacts to the Game Offer: Purchased and Ended. If the Game Offer was accepted and purchased by the end user, the Purchased exit port runs; otherwise, if the end user exits the Game Offer or ignores the Game Offer, the Ended exit port runs instead.

Attachments can also be added to this node. Check out the Attachments section to learn more about this feature.

Activate Offer Node

Discount parameter can be use to set up discount for an offer before activation. Discount is in %, so, for example, to make it 50% you shall put 50 in the field.

To make it work, products are being used. All these products shall be added to Dynamic Pricing list on In-game Store page. After that, if an offer is being activated with a discount, the following happens:

  • New price is calculated as = current price * (1 - discount)
  • The closest product by value from Dynamic Pricing list is taken as a new price
  • Discount is re-calculated as = (1 - new price/old price). It is needed, if the new price is too different from what was expected by initial discount provided.
  • offerInfo is returned with final discount and the new price

Deactivate Offer

The Deactivate Offer Node takes in the unique instance id of an activated Game Offer and deactivates it, ending the Game Offer for the end user. The unique instance id passed into the input Id port is the same instance id that the Activate Offer node outputs to its output Id port; simply connect both ports together if you wish to deactivate a Game Offer.

Deactivate Offer Node

Activate Multiplier

The Activate Multiplier Node multiplies the rewards for specific Store Items by the multiplier value from the input Multiplier port. The specific Store Items that are multiplied rewards for are those that are in the Multiplied Store Items list in the In-Game Store, which can be found by clicking on the In-Game Store button to the right of the LiveOps section in the navigation panel.

Activate Multiplier Node

Reset Multiplier

The Reset Multiplier Node resets the multipliers applied to the specific Store Items specified in the Activate Multiplier node.

Reset Multiplier Node

Activate Offer Group

The Activate Offer Group Node takes in a Game Offer Group, activates it, and returns a unique instance id for this activated Game Offer Group through the output Id port. The node takes in a Game Offer Group either by selecting it by clicking on the Select Game Offer Group... button on the node or by connecting into the input Id port and passing the Game Offer from another node.

There are two exit ports that get triggered depending on how the end user reacts to the Game Offer: Purchased and Ended. If the Game Offer was accepted and purchased by the end user, the Purchased exit port runs; otherwise, if the end user exits the Game Offer or ignores the Game Offer, the Ended exit port runs instead.

Activate Offer Group Node

Deactivate Offer Group

The Deactivate Offer Group Node takes in the unique instance id of an activated Game Offer Group and deactivates it, ending the Game Offer Group for the end user. The unique instance id passed into the input Id port is the same instance id that the Activate Offer Group node outputs to its output Result port; simply connect both ports together if you wish to deactivate a Game Offer Group.

Deactivate Offer Group Node

Offers: Event Nodes

On Offer Purchased

The On Offer Purchased Node is an Event Node that notifies the connected node when the specified Game Offer has been purchased. The input Id port takes in a unique instance id of an activated Game Offer. Once the specified Game Offer from the input Value port has passed, the Event exit port runs.

On Offer Purchased Node

Misc Nodes

Log

The Log Node prints the value passed into the input Value port into the console in the game engine.

Log Node

Reset Script

The Reset Script Node restarts the Script; effectively resetting the Script and its environment. This includes values stored in variables and any objects and lists passed around in the Script.

Reset Script Node

Parallel

The Parallel Node is used to run multiple nodes at the same time immediately after another node. Because of the Control Flow and the Link Rule stating that an Exit Port can connect to only one Enter Port, each node will have to wait for the previous node to finish to be able to run. Without the Parallel Node, there would be no way structuring your Script to run multiple nodes simultaneously. Note that this does not mean that the logic of the nodes will be run in a multithreaded way.

More exit ports can be added by clicking on the green + icon on the node.

Parallel Node

Calls Counter

The Calls Counter Node runs the Exit port only when this node is activated exactly as many times as the input Count port value specifies. Activating this node through its Reset enter port will reset the internal count the node keeps track of, and until it reaches the specified Count, it will not run the Exit port.

Calls Counter Node

Empty

The Empty Node simply runs the Exit port when the node activates. This is used mainly to organize and clean up the connections in a Script, and are especially useful when looping the Control Flow to an earlier part of the Script.

Empty Node

Run Method

The Run Method Node is for running a custom method that you made. This allows for adding some complex logic into your Scripts that are not usually possible within Visual Scripting. The path to the custom method needs to be set to the input Path port.

The node itself can be renamed to better reflect the name of your method; simply click on the Run Method at the top of the node. Exit, input, and output ports can also be added and named to fit your custom method better.

Check out the Running custom methods sections to learn more about creating your custom methods.

Run Method Node

Limit

The Limit Node lets only the first Enter and Exit port pair that runs to continue running and blocks the other port pairs.

Limit Node

On Script Will Exit

The On Script Will Exit Node activates and runs the Exit port right before the Script is about to exit.

On Script Will Exit Node

Tips and Tricks

Event Nodes

When activated, Event Nodes will subscribe to the relevant event and will wait for an event to happen before running their Event exit ports. These events can be a change in the tracked values, an end user action, or checking if a condition is passed. Usually, the names of these nodes start with an On keyword.

However, once the event is triggered and the Event Node runs their exit ports, the node itself will have to be activated again to continue listening for their events. This involves looping back into and reconnecting to the Enter port of the Event Node to activate it again.

Furthermore, if there is no link connected to the Enter port of the Event Node, these nodes will be automatically activated once when the Script is launched.

Reactivating Event Nodes

Running custom methods

These are the requirements when creating your own custom method:

  • The custom method must be in a public class under a namespace.
  • The custom method must be a public and static method.
  • The return type can only be either void or NodeRunFunctionReturnType.
  • The method parameters must match the Input ports' names, their order and types on the related Run Method node. The name is case-sensitive and must be exact; this includes any symbols, like underscores, added in the name.
  • If the related Run Method node has some Output ports, the NodeRunFunctionReturnType must be returned with a Dictionary. The keys in this Dictionary are the Output port names, which is case-sensitive and must be matched exactly, including any symbols. The values in this Dictionary are the values to be passed to the Output ports. For example, if you have Output number ports named new_speed and new_accel, your method return must look like this:
    return new NodeRunFunctionReturnType(
        new Dictionary<string, object> {
            {"new_speed", 10}, 
            {"new_accel", 9.81}
        }
    );
    
  • If the related Run Method node has some Exit ports, you can return either void or NodeRunFunctionReturnType. If you return void, the Run Method node will simply run its default Exit port. Otherwise, if you return NodeRunFunctionReturnType and specify an Exit port to run, the Run Method node will instead run that Exit port upon finishing its logic. For example, if you have an Exit port named AfterReset, it can be passed like so:
    return new NodeRunFunctionReturnType(
        new Dictionary<string, object> {
            {"new_speed", 10}, 
            {"new_accel", 9.81}
        }, 
        "AfterReset"
    );
    
    Here is what a full custom method with its namespace might look like:
    namespace Experiments { 
        public class SpeedManager { 
            public static NodeRunFunctionReturnType IncreaseSpeed(int speed) {
                return new NodeRunFunctionReturnType(
                    new Dictionary<string, object> {
                        {"new_speed", speed * 2}
                    }
                ); 
            } 
    
            public static NodeRunFunctionReturnType ResetSpeed() {
                return new NodeRunFunctionReturnType(
                    new Dictionary<string, object> {
                        {"new_speed", 10}, 
                        {"new_accel", 9.81}
                    }, 
                    "AfterReset"
                );
            } 
        } 
    }
    
    Afterwards, when you create your Run Method nodes, the paths to write into the input Path port would be Experiments.SpeedManager.IncreaseSpeed and Experiments.SpeedManager.ResetSpeed.

Running Custom Methods

Attachments

Some nodes can be attached other documents into. These attached documents can be of any template. Currently, there are only two nodes that can have attachments:

A common use-case for this feature is to attach documents that describes the UI of the activated Game Offer. Once the Game Offer is activated, you can access the offerInfo from your code. This offerInfo contains information about your activated Game Offer, as well as the attached documents it has, which is stored in the offerInfo.Attachments property.

Attachments