From 3783b39303f7aa4a7aa81778e084647bb9a0c2a5 Mon Sep 17 00:00:00 2001 From: "L. Lei" <11454735+LangLEvoI@users.noreply.github.com> Date: Sun, 8 Oct 2023 00:00:37 +0800 Subject: [PATCH] Update modifying-agent-variables.rst C++ -> agent python statement --- src/guide/agent-functions/modifying-agent-variables.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/guide/agent-functions/modifying-agent-variables.rst b/src/guide/agent-functions/modifying-agent-variables.rst index 07ff96cb2..0f50dd4f4 100644 --- a/src/guide/agent-functions/modifying-agent-variables.rst +++ b/src/guide/agent-functions/modifying-agent-variables.rst @@ -81,13 +81,13 @@ Within Python agent functions array lengths can be be specified by appending ``A def ExampleFn(message_in: pyflamegpu.MessageNone, message_out: pyflamegpu.MessageNone): # Return agent variable 'location[1]' and store it in local variable 'y' # The length of the array must be appended to the name of the type instantiated getVariable function, in this example the array has a length of 3 - y = pyflamegpu.getVariableIntArray3("location", 1); + y = pyflamegpu.getVariableIntArray3("location", 1) # Update the local copy - y+=1; + y+=1 # Store the updated local copy in the agent's 'location[1]' variable - FLAMEGPU->setVariableIntArray3("location", 1, y); + pyflamegpu.setVariableIntArray3("location", 1, y) # Other behaviour code ... @@ -126,4 +126,4 @@ Related Links ------------- * User Guide Page: :ref:`Defining Agents` -* Full API documentation for :class:`AgentFunctionDescription` \ No newline at end of file +* Full API documentation for :class:`AgentFunctionDescription`