I need to get an if,then,else code block to use the code in the image which I need for my game im making.(image credit to ego-lay_atman-bay)
(upload://rYn2g572hZPDUoVLkFA8WZZPZMh.png)
Please provide more information
one sec
trying to figure out how to get the image in, I'm making a game where an sprite goes towards the center of the map and I need it to spawn out side of the map and I found an forum post of how to do that but I can't find the code block in the editor.
Use snap blocks
[sb]snap blocks[/sb]
if then else
..do you just need an if then else block?
i can find an if and a if else, but I need an if then else
if <> { } else { } is an if then else
thanks
What did you think it did?
one sec I need to put it in
this is forum with the pic btw "I need help with random placement outside of edge of enemy in a game" i cant put the link in a reply for some reason
also I cant use the if else because I need to have 3 spaces to put some operating code blocks and some movement code blocks into and if else only has 2 spaces.
I found it, thank for the help btw.
The forum won't let you post links or images until you have a trust level of "regular". This is to prevent bots and spamming, and you can graduated by getting just a little more read time.
Here is your image from the first post.
Literally how did you get that image?
The image IDs aren't even the same.
I looked at a normal image (the one I uploaded showing trust level):
I took the initial part and appended it to the second part:

But the dimensions were wrong:
So, I changed the dimensions through trial and error. As it turns out, I could have just deleted the dimension part:

Looking at the image, I realized that you might be wanting this:
(if <> then [] else []
If you scroll down in the control palette, all the if blocks are there:
Did you know that you can specify inputs in Snapblocks? Let me show you:
Square brackets give text inputs, round ones give number inputs.
say [hello there] for (2) secs
say [hello there] for (2) secs
Boolean slots are made using <>, and c-shapes are made with curly brackets and new lines.
if <> {
}
if <> { }
Reporters are made using round brackets:
(if <> then [] else [])
(if <> then [] else [])
Finally, you can make your own blocks using overrides ( :: your override).
testing123
testing123
testing123 :: motion hat
testing123 :: motion hat
If you want multiple cases, use if <> { } else if <> { }else if <t>{ }@<> (from clicking the black, right-facing arrow twice). You can use the last case with the toggle on to act like the else.