return values with a function

Get help using Construct 2

Post » Mon Dec 09, 2013 6:19 am

hi...can someone point me to info on an example of returning a value with a function....I found how to pass a function a value but how does you use the value returned by a function?

thanks
Dan
B
8
S
3
G
1
Posts: 87
Reputation: 1,493

Post » Mon Dec 09, 2013 6:27 am

Action: Function:Set return value

Expression: Function:ReturnValue

manual
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Mon Dec 09, 2013 6:36 am

@blackhornet

thanks!...but when I create a function with local variable inside of it, why wont it let me select one of those local variables as a return value?
thanks
DAn
B
8
S
3
G
1
Posts: 87
Reputation: 1,493

Post » Mon Dec 09, 2013 6:41 am

ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Mon Dec 09, 2013 6:54 am

oh ok....thanks!
B
8
S
3
G
1
Posts: 87
Reputation: 1,493

Post » Mon Dec 09, 2013 12:03 pm

easier would be (using blackhornet's example)

set text to function.call("MyFnc")

combines the two lines into one
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786


Return to How do I....?

Who is online

Users browsing this forum: Bro7hers, ketramtu18, Yahoo [Bot] and 8 guests