Wiki source code of Set x to [value]
Last modified by admin on 2023/10/27 09:08
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | (% class="box infomessage" %) | ||
2 | ((( | ||
3 | Sets the x-coordinate of an object to a specified value. By default objects will be placed at x: 0 and x: 0, which is the center of your screen. | ||
4 | |||
5 | The value you write in the input field does not have to be fixed, you can also calculate it with the [[formula editor>>doc:Documentation.FormulaEditor.WebHome]]. You can use various mathematical functions such as 'Round', 'Pi' or 'Arctangent(-1,0)', or have random numbers calculated. | ||
6 | |||
7 | [[image:set_x_to_brick.png||alt="Set X Brick"]] | ||
8 | ))) | ||
9 | |||
10 | (% class="row" %) | ||
11 | ((( | ||
12 | (% class="col-xs-12 col-sm-6" %) | ||
13 | ((( | ||
14 | (% class="box" %) | ||
15 | ((( | ||
16 | ==== **Example** ==== | ||
17 | |||
18 | The object will change its position randomly every 0.5 seconds. The X-coordinate will range from -300 to 300. | ||
19 | |||
20 | [[image:set_x_to2.png||alt="Set X Example 1"]] | ||
21 | ))) | ||
22 | ))) | ||
23 | |||
24 | (% class="col-xs-12 col-sm-6" %) | ||
25 | ((( | ||
26 | (% class="box" %) | ||
27 | ((( | ||
28 | ==== **Result** ==== | ||
29 | |||
30 | [[[[image:null4.png||alt="Download"]]>>https://share.catrob.at/pocketcode/program/38127]] | ||
31 | |||
32 | [[image:set-x-to-__-3.gif||alt="Set X Result"]] | ||
33 | ))) | ||
34 | ))) | ||
35 | ))) | ||
36 | |||
37 | (% id="gtx-trans" style="position: absolute; left: 433px; top: 519px;" %) | ||
38 | ((( | ||
39 | (% class="gtx-trans-icon" %) | ||
40 | ((( | ||
41 | |||
42 | ))) | ||
43 | ))) |