Jump to content

CallOutputs return value?

Recommended Posts

Can self.component:CallOutput( "something" ) give a return value ?

Means that the in-function returns a value that is passed to the CallOutput return




function Script:func()

local retval = self.component:CallOutput( "something" )

System:Print( retval ) -- prints "Hello" ?





function Script:something()--in

return "Hello"


Share this post

Link to post

it can't at least directly. But you can do it with 3 functions.


1. the argument function:

function Script:something()--arg
return "Hello"


2. the output function:

function Script:Use()


3. the receiving function:

function Script:Receive(yourvalue)--in
System:Print( yourvalue )


now just connect the use function with the receive function and drag the something function to the argument point in the flowgraph.




just like in some of my scripts. For example this:


Edited by beo6

Share this post

Link to post

Just to confirm, CallOutputs does not return a value:

void Entity::CallOutputs(const std::string& name)

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...