0

I have some questions now, I don't know how it works. please teach me these knowledge if you know it, thanks a lot.

this is my first project, I have some questions. enter image description here question: I want to let Tera have two different answers when cat say "hello!" to him, he will answer "hello~!" or "go away", but I can't find the way to trigger it.

I have thought random number 0 to 10, if it between 0-5, answer "hello~!", else if answer "go away", but I can't let this operation fill in "Control".

Can anyone tell me how to solve it? thanks.

1 Answer 1

1

If I understand your question correctly, you don't know how to get one sprite to communicate with another. Different scripts can either communicate using variables or by events. In your case, I would say an event would be more useful.

Under events, there is a block that says broadcast message 1. Drag it under where the cat says hello. Now change the when green flag clicked to when I receive message 1. Now you have an event.

1
  • Agreed! An event will most likely be best suited here for communication as it is basically an inter-spite if-else block. Commented Aug 29, 2022 at 16:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .