Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
gdevelop5:events:functions [2019/07/02 13:41]
piyushpalawat99
gdevelop5:events:functions [2019/07/02 22:03] (current)
4ian
Line 77: Line 77:
  
 This is a really simple and not really useful example of a function (you could as well use the action to rotate objects directly without writing a function). But, when you add more complex logic inside, a function'​s strength can be seen. It's then super easy to reuse this logic from the rest of the game! This is a really simple and not really useful example of a function (you could as well use the action to rotate objects directly without writing a function). But, when you add more complex logic inside, a function'​s strength can be seen. It's then super easy to reuse this logic from the rest of the game!
 +
 +<​note>​If your function is a condition or an expression, [[gdevelop5:​events:​functions:​return|use the actions in "​Functions"​ category to set the expression/​condition value]] (also called the "​return value"​). </​note>​
  
 ## Using the function in your game ## Using the function in your game