Jump to content
Sign in to follow this  
Ehvis

Can't damage new blocks

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>

 

 

  • Like 1

Share this post


Link to post
Share on other sites

The minimum you need for a block is shape, model, and material. Try it with only those first.

Share this post


Link to post
Share on other sites
Posted (edited)
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>

 

Edited by d-luX (see edit history)

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...