Need help with “when it’s touching”


#1

So I’m trying to make a thing but I need something to set a variable to something when it’s touching something and to change the variable when it’s not and idk how to do this


#2

I have wondered the exact same thing.


#3


This should work😀


#4

I tried something like that but it doesn’t work. The variable can’t change it needs to stay the same while it’s touching something.


#5

Maybe you could use a check once if block?

When it’s touching the object, set variable to “this”

Repeat forever
Check once if variable=this
Repeat (however many times)
Set variable to “this”


#6

i got it. I don’t remember how but it uses like ten variables


#7

Yipes. Can you post it please? I need the code.


#8

Here. There a slight delay but it’s as fas as I could make it


#9

Nice nice nice I nominate it for featured!!!


#10

That’s the code I gave you?!


#11

No I used the idea of the code U gave me but I changed it because the code you gave doesn’t work for what I need


#12

My code

!

Your code


#13

Not all the code is in the text


#14

It’s the same?! @parttimefemaIe


#15


#16


Your right it’s slightly different nice job! You should make a game with this!


#17

I am that’s why I asked how to do it


#18

What game? @PartTimeFemaIle


#19

It’s an rpg. Working on the demo. Probably be out by monday


#20

I see that you got it working, and that’s great! I am excited for the game that you are talking about!