Tile - Custom Function List – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (YlandsClassyBot moved page Ylands Tile - Custom instruction to Ylands:Tile - Custom Function List: New Structure)
No edit summary
Line 1: Line 1:
[[Image:Ylands_Tile_-_Custom_instruction1.png]]
<!---
*'''Custom''' instruction is a standalone '''sequence''' designed to perform a particular task and can be '''called''' from '''anywhere''' within the script of '''currently''' edited '''object'''.
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
*Any '''instruction''' which does '''not''' return any '''value''' is called '''statement'''.
-->
*Any custom instruction consists of '''two parts''' - instruction '''definition''' and instruction '''call'''
== Custom Function List ==
*'''Instruction definition'''
**Defines '''parameters''' and '''contents''' of custom instruction.
**It is standalone script block - '''does not snap''' with other blocks.
**To create new custom instruction, simply place new block anywhere in the canvas.
**Name and parameters of a instruction can be edited via context menu (right click on block).
**Parameters work as [[Ylands Tile - Variable local|'''local''']] variables and can be used inside the custom instruction.
**Custom instruction can be terminated at any point using [[Ylands Tile - Return|'''return''']] block.
*'''Instruction call'''
**Executes the custom instruction, with defined parameters.
**Can be placed in any sequence as any other instruction.


[[File:YlandsTile-326.png]]


[[Image:Ylands_Tile_-_Custom_instruction2.png]]
=== Description ===
*Any '''Instruction''' which returns a '''value''' is called '''expression'''.
*Expression '''definition''' work in '''same''' way as for '''statement''' instructions.
*Instruction '''call''' has to be '''docked''' as '''input''' of another instruction as it would be a variable or literal.


=Notes=
'''Custom instruction''' is a standalone '''sequence''' designed to perform a particular task and can be '''called''' from '''anywhere''' within the script of '''currently''' edited '''object'''.
*Custom instructions of [[Ylands Game logic - Global storage|'''Global Storage''']] are considered '''global''' and are available within the scope of whole game script.
 
*Custom instructions of [[Ylands Game logic - Entity storage|'''Entity Storage''']] are considered '''member''' and are available within the scope of [[Ylands Tile - Storage owner literal|'''Storage Owner''']].
=== Notes ===
*See also: [[Ylands Tile - Return|'''Return''']]
 
* Any '''instruction''' which does '''not''' return any '''value''' is called a '''statement''' and any '''instruction''' that '''does''' is called an '''expression'''.
* Any custom instruction consists of '''two parts''' - instruction '''definition''' and instruction '''call''' '''Instruction definition'''
* Defines '''parameters''' and '''contents''' of custom instruction.
* It is standalone script block - '''does not snap''' with other blocks.
* To create new custom instruction, simply place new block anywhere in the canvas.
* Name and parameters of a instruction can be edited via context menu (right click on block).
* Parameters work as '''local variables''' and can be used inside the custom instruction.
* Custom instruction can be terminated at any point by using the '''Return''' block. '''Instruction call'''
* Executes the custom instruction, with defined parameters.
* Can be placed in any sequence as any other instruction.
* Custom instructions of '''Global Storage''' are considered '''global''' and are available within the entirety of the game script.
* Custom instructions of '''Entity Storage''' are considered '''member''' and are available within the scope of the '''Storage Owner'''.




Line 31: Line 31:


[[Category: Instructions]]
[[Category: Instructions]]
[[Category: Ylands 0.12]]

Revision as of 08:53, 8 July 2021

Custom Function List

YlandsTile-326.png

Description

Custom instruction is a standalone sequence designed to perform a particular task and can be called from anywhere within the script of currently edited object.

Notes

  • Any instruction which does not return any value is called a statement and any instruction that does is called an expression.
  • Any custom instruction consists of two parts - instruction definition and instruction call Instruction definition
  • Defines parameters and contents of custom instruction.
  • It is standalone script block - does not snap with other blocks.
  • To create new custom instruction, simply place new block anywhere in the canvas.
  • Name and parameters of a instruction can be edited via context menu (right click on block).
  • Parameters work as local variables and can be used inside the custom instruction.
  • Custom instruction can be terminated at any point by using the Return block. Instruction call
  • Executes the custom instruction, with defined parameters.
  • Can be placed in any sequence as any other instruction.
  • Custom instructions of Global Storage are considered global and are available within the entirety of the game script.
  • Custom instructions of Entity Storage are considered member and are available within the scope of the Storage Owner.