Question about rg_remove_entity and SetThink/Touch

Сообщения
7
Реакции
0
Hi :3
I wanna just know, what's correct

When remove an entity, What's correct method:

C:
SetThink(entity, "") // Unset Think callback before remove entity.
SetTouch(entity, "")
rg_remove_entity(entity)
or remove that directly :

C:
rg_remove_entity(entity)
Thanks in advance 👍
 
Сообщения
50
Реакции
0
Помог
1 раз(а)
SetTouch
Purpose: The SetTouch function assigns a touch callback to an entity. This callback is triggered when another entity comes into contact with it.


rg_remove_entity
Purpose: This function is used to remove an entity from the game. It effectively deletes the specified entity, making it no longer part of the game world.
 
Сообщения
14
Реакции
2
Помог
1 раз(а)
I might be wrong, but as far as I know, deleting the entity via rg_remove_entity, removes the SetThink/Touch, so you dont have to do it beforehand.
 
Сообщения
685
Реакции
581
Предупреждения
8
Помог
9 раз(а)

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу