1 Prefab Editing Buildings
When you edit a building, always “Save as Prefab” to the suggested category, otherwise you will create a new prefab instead of changing the old one.
1.1 Destruction States
In the case of buildings, destruction states are not separate prefabs but are edited within the same prefab as the building.
=== EM5 Building component ===
To make your prefab a building, add the component Damage -> EM5 Building.
1.2 ContainedEntities
This slot is used by the game logic to put persons into the building. A person that is linked to this slot is in the building and will not be shown in the game.
1.3 DamageState
Set the damage state of the Building
- IntactMesh
- DamagedMesh
- DestroyedMesh
All three fields MUST be filled. IntactMesh must always be exactly the same as the mesh property in the Mesh component. If there are no damage meshes for a building, assign the intact mesh to the DamagedMesh and DestroyedMesh property.
1.4 MainDoor
Link a door entity to this slot. You should use this entity: "gamelogic_entity\door_main_entrance_entity"
The door defines the position where persons entering the building will despawn and persons exiting the building will spawn. Place it in front of an actual door, so it makes sense for people to spawn / despawn there.
The line of the debug box shows the direction people who exit the building will face on spawn. Rotate the entity so that this line faces away from the building.
1.5 LightArray
Link light entities to this slot
1.6 EventWindow
Link an entity to this slot to define the position where a person will stand on the balcony to be rescued by the DLK when the building is on fire. You can in theory use any entity for this, but you should use this entity:
"gamelogic_entity\EventWindow_entity"
1.7 WindowArray
If you link particle effects to this slot, they will be played when the building transitions from DAMAGESTATE_INTACT to DAMAGESTATE_DAMAGED.
1.8 ParticlesArray
If you link particle effects to this slot, they will be played when the building transitions from DAMAGESTATE_DAMAGED to DAMAGESTATE_DESTROYED.
- ChildDamagArray
- ChildDestroyedArray
Child Entities linked to these slots will disappear when the building gets damaged.