# Tutorial ghost blocks

**URL:** <https://forum.makecode.com/t/tutorial-ghost-blocks/6438>\
**Category:** Arcade\
**Created:** [March 1, 2021, 5:22am UTC](https://forum.makecode.com/t/tutorial-ghost-blocks/6438 "2021-03-01T05:22:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr-Coxall](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mr-coxall/32/513_2.png) [@Mr-Coxall](https://forum.makecode.com/u/Mr-Coxall)\
**Post date:** [March 1, 2021, 5:22am UTC](https://forum.makecode.com/t/tutorial-ghost-blocks/6438/1 "2021-03-01T05:22:36Z")

</div>

While writing a tutorial, I would like to include some “ghost” blocks (block that are not included in the tutorial) in the set of visible blocks.  
I have this working, for example:

```auto
effects.confetti.startScreenEffect()

forever(function () {
})
pause(1000)
for (let index = 0; index < 5; index++) {
}
while (false) { 
}
for (let value of list) { 
}
break;
continue;

if (true) {
}

list = [0, 1]
text_list = ["a", "b", "c"]

```

The issue that I am having is how do you include blocks from “Math” or “logic” that are not a block by themselves, but go inside other blocks. Like:  
1 + 1  
true && true  
true || false

They are not showing up for some reason.  
Thanks

---

<div class="post-metadata">

**Author:** ![Mr-Coxall](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mr-coxall/32/513_2.png) [@Mr-Coxall](https://forum.makecode.com/u/Mr-Coxall)\
**Post date:** [March 1, 2021, 4:35pm UTC](https://forum.makecode.com/t/tutorial-ghost-blocks/6438/2 "2021-03-01T16:35:58Z")

</div>

I have been able to get part of the way to a solution.  
If you include the partial blocks inside a full block, then they get included in the ghost list.  
For example:

```auto
for (let index = 0; index < Math.min(Math.sqrt(4), randint(3, 10)) + 5 % Math.abs(2); index++) {
	
}
if (!(true && false)) {
	
} else if (0 == 0) {
	
} else if ("" == "") {
	
} else if (false) {
	
} else {
	
}

```

The issue now is for “primitive” blocks like “true”, “false” & “0”.  
I still can not make them show up.  
Even if you include them inside another block, I assume because they just show up as values in JavaScript, they are not being picked up.

From playing around, I do not think the primitive blocks are needed.  
It seems they are just for connivance.  
I have been able to create any math or boolean expression I want to create

Thanks

---

<div class="post-metadata">

**Author:** ![shakao](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shakao/32/113_2.png) [@shakao](https://forum.makecode.com/u/shakao)\
**Post date:** [March 1, 2021, 4:55pm UTC](https://forum.makecode.com/t/tutorial-ghost-blocks/6438/3 "2021-03-01T16:55:53Z")

</div>

You can get the boolean blocks to show up by assigning their value to a variable:

````
```ghost
let a = true
let b = "hello"
```

````

That should also work for most basic values except numbers, which are the default value for the variable block, so we remove them from the toolbox. I don’t _think_ we have a way to get the standalone number block to appear in the toolbox, unfortunately.
