Jump to content

Can't damage new blocks


Ehvis

Recommended Posts

Moving on from doing things with existing blocks and fixing other stuff, I'm no trying to create my own blocks. Everything went well, except for one little detail: I can't seem to damage them. I've checked other blocks but nothing looks immediately related. The objects do have proper collision boxes because they do prevent me from hitting the ground blocks. So either I missed something less obvious in the block definition (see below) or maybe something needs tagging in Unity.

 

A hint would be appreciated!

 

 

 

<block name="casinoSlotMachine">

<property name="Group" value="Decor/Miscellaneous"/>

<property name="Material" value="Mmetal"/>

<property name="Shape" value="ModelEntity"/>

<property name="Model" value="#@modfolder:Resources/Casino.unity3d?SlotMachine.prefab" />

<property name="MultiBlockDim" value="2,2,2" />

<property name="CreativeMode" value="Player"/>

<property class="RepairItems"> <property name="resourceForgedIron" value="1"/> </property>

<property name="Collide" value="melee,bullet,arrow,rocket,movement"/>

<drop event="Destroy" name="resourceScrapIron" count="10,15"/>

<property name="OnlySimpleRotations" value="true"/>

<property name="FilterTags" value="fdecor,fother,ffurniture"/>

<property name="SortOrder1" value="70k0"/>

<property name="DescriptionKey" value="casinoBlockGroupDesc"/>

</block>

 

 

Link to comment
Share on other sites

Moving on from doing things with existing blocks and fixing other stuff, I'm no trying to create my own blocks. Everything went well, except for one little detail: I can't seem to damage them. I've checked other blocks but nothing looks immediately related. The objects do have proper collision boxes because they do prevent me from hitting the ground blocks

 

Exactly the same problem here.

 

<configs>
<append xpath="/blocks">
<block name="WoodenFence1Prefab">
<property name="Shape" value="ModelEntity" />
<property name="Model" value="#@modfolder:Resources/WoodenFences.unity3d?WoodenFence1"/>
<property name="ModelOffset" value="0,-0.2,0"/>
<property name="MultiBlockDim" value="3,2,1"/>
<property name="Material" value="MtreeWoodFull"/>
<property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
<drop event="Harvest" name="resourceWood" count="150" tag="oreWoodHarvest"/>
<drop event="Destroy" name="treePlantedMountainPine1m" count="2"/>
<property name="ParticleOnDeath" value="treeGib_burnt_55m"/>
</block>
</append>
</configs>

 

Link to comment
Share on other sites

Ok, adding a T_Mesh_B tag on the object with the collider seems to have resolved this problem.

 

I'm not entirely sure this is the correct tag since I have only seen this tag mentioned for objects that need interaction. However, that's a minor detail since it doesn't appear to have any other effects.

Link to comment
Share on other sites

I had a problem like that for half a day and it was driving me crazy. I found out the tag must be in the right spot as well. My tags after GameController is DummyTag, T_Block and then T_Mesh_B. You NEED T_Mesh_B for any block/object/item that you want to interact with( That includes destroying). This should help

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...