Как исправить эту ошибку how to fix this error

как сделать так чтобы какие то объекты не сталкивались друг с другом, но сталкивались с каким то классом объектов. (для игры raft 2d делаю “собиратель ресурсов”- когда объект сталкивается с “собирателем ресурсов” он должен останавливается и ты можешь его собрать. а проблема в том, что объекты сталкиваются друг с другом и получается “башенка”)

how to make sure that some objects do not collide with each other, but faced with some class of objects. (for the game raft 2d do “gather resources” - when the object is faced with" gather resources " he must stop and you can collect it. and the problem is that the objects collide with each other and get " turret")

1 Like

и ещё у меня есть предложение для ready. если можно будет самому добавлять “ПОДклассы” можно будет поместить объект в несколько классов!

and I have a suggestion for ready. if you can add “Subclasses” you can put the object in multiple classes!

1 Like

Привет @kirill2 - можно попробовать отключать твёрдость объектов, когда это необходимо. Например:
(Hi @ kirill2 - you can try to disable the Solid of objects when necessary. For example:)
Event 1
If (Class Point 1/Sensing/Touch in object/Class Point 2)
Then (Affected object in class Point 1/Physical/Solid/Off)
(Affected object in class Point 2/Physical/Solid/Off)

Event 2
If (System/Runtime/Repeat Every/0.5 sec)
Then (All objects in class Point 1/Physical/Solid/On)
(All objects in class Point 2/Physical/Solid/On)
“and I have a suggestion for ready. if you can add “Subclasses” you can put the object in multiple classes!” - В этом нет необходимости, для этого мы можем использовать поведение счётчик. Мы можем создать отдельный класс “Point” , добавить поведение счётчик (Для каждого из объектов) и присвоить каждому из объектов разные значение для счётчика. Таким образом мы получим объекты в одном классе с разными настройками.
(This is not necessary, for this we can use the behavior of the counter. We can create a separate class “Point”, add the “Counter” behavior (For each of the objects) and assign to each of the objects a different value for the counter. This way we will get objects in the same class with different settings.)

1 Like

I meant to put objects of different classes into a single class

I understand … but you can use a counter for an object in a subclass instead of a class and access them directly from the counter number. It will be the same that you are referring to a subclass.
Example:
All objects in the class Point

  • Point1 (Counter value = 1)
  • Point2 (Counter value = 2)
  • Point3 (Counter value = 3)

    Event: If(All object in class Point/ Counter/ Set value/2)
    Affected object in the class Point/Appearance/Solid/Off

You can use this method. Perhaps in the future we will change this

2 Likes