Login

Fancade Wiki

Upload imgur images to /uploads/

... ...
@@ -2,12 +2,12 @@ Script blocks are executed top-to-bottom, left-to-right, [by default](Execution
2 2
3 3
### Example 1
4 4
This one is common among newbies. In this case, the problem is easy to spot. The variable **A is defined AFTER the Set Position** that has A as an input. Since A is not yet defined when Set Position was run, it simply does nothing resulting in a buggy script.
5
[[https://imgur.com/NZgn9C7.jpg]]
5
[[/uploads/NZgn9C7.jpeg]]
6 6
A simple solution for this is to **define A before the Set Position**.
7
[[https://imgur.com/4KJxQG5.jpg]]
7
[[/uploads/4KJxQG5.jpeg]]
8 8
9 9
### Example 2
10 10
Create Object is one of those scripts that has **an output AND execute wires** attached to it. If a scripts has both, output and execute wires, it's usually a good idea to set those outputs into a variable using the After Wire. Else, you'll suffer from an **One Frame Delay**.
11
[[https://imgur.com/7xNbBVB.jpg]]
11
[[/uploads/7xNbBVB.jpeg]]
12 12
The script shown above will suffer from that One Frame delay, since each frame the object that gets created is set onto the variable A **after** the set position has run. A simple fix would be, is to set the variable via the After Wire.
13
[[https://imgur.com/4iUV6ZV.jpg]]
... ...
\ No newline at end of file
0
[[/uploads/4iUV6ZV.jpeg]]
... ...
\ No newline at end of file
Fancade Wiki