SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
83 stars 17 forks source link

Object doesn't disable Collider when no conditions #4412

Closed sunnamed434 closed 1 month ago

sunnamed434 commented 1 month ago

I have an object that must be shown only when 50006 flag is set to true via NPCs or somewhere else, however, when 50006 flag is set as false object is "invisible" (and it is just fine) and the player can't go through this place where this object supposed to be, it means collider stops the player, my idea if there are no conditions completed object collider must be hidden (component disabled).

Note: Once an object picked-up NPC quest is completed i.e 50007 is set to true to mark that quest is completed, and 50006 to false to hide the object

.dat file of the object:

GUID ..

Type Medium

ID ..

Has_Clip_Prefab False

Conditions 1
Condition_0_Type Flag_Bool
Condition_0_ID 50006
Condition_0_Value True
Condition_0_Logic Equal

Interactability Quest
Interactability_Effect 7
Interactability_Rewards 2
Interactability_Reward_0_Type Flag_Bool
Interactability_Reward_0_ID 50007
Interactability_Reward_0_Value True
Interactability_Reward_1_Type Flag_Bool
Interactability_Reward_1_ID 50006
Interactability_Reward_1_Value False
SDGNelson commented 1 month ago

Unfortunately, this is a limitation - conditions are only for the visibility of objects. i.e., there is no per-player collision. All vanilla and curated objects with visibility conditions do not have collision.