Sorrowthief Posted January 25, 2019 Share Posted January 25, 2019 So I have my trap that I made in Unity running in game and it spins like I want it to but I have been lost for days on how to make it do damage from the hammer part that's moving. I can supply the xml code I'm using and I have tried every varioation of class. BladeTrap, Damage, TrunkTip. No matter what I do it will not do damage on the rotating part and will only harm the player when they walk under it. I have a link to a video that shows my Unity stuff and my 7 days result. If someone could help me figure this part out Id greatly appreciate it. Video Link https://www.youtube.com/watch?v=3D049voWOdk&feature=youtu.be And yeah I need a decent screen recorder lol Here is my xml block code. I just copied pasted the BladeTrap at first and have not taken out or edited it much. I have tried many different ways and classes and this is just the one that doesn't work atm. <block name="HammerTrapElectric"> <property name="CreativeMode" value="Player"/> <property name="Class" value="TrunkTip"/> <property name="Material" value="Mmetal_hard"/> <property name="Damage" value="20"/> <property name="DamageReceived" value="4"/> <property name="MaxDamage" value="2000"/> <property name="StabilitySupport" value="false"/> <!-- build restriction --> <property name="Shape" value="ModelEntity"/> <property name="Collide" value="movement,melee,bullet,arrow,rocket"/> <property name="CustomIcon" value="ShockStick" /> <property name="Model" value="#@modfolder:Resources/HammerTrapElectric.unity3d?HammerTrapElectric"/> <property name="DisplayType" value="blockElectricalMulti" /> <property name="MultiBlockDim" value="1,2,1" /> <property name="IsTerrainDecoration" value="true"/> <property name="Collide" value="movement,melee,bullet,arrow,rocket"/> <property name="Group" value="Tools/Traps,Science,Building"/> <property class="RepairItems"> <property name="resourceForgedSteel" value="16"/> <property name="resourceMechanicalParts" value="5"/> <property name="resourceElectricParts" value="3"/> </property> <drop event="Harvest" name="terrStone" count="0" tool_category="Disassemble"/> <drop event="Harvest" name="resourceMechanicalParts" count="1,4" tag="salvageHarvest"/> <drop event="Harvest" name="resourceElectricParts" count="1,3" tag="salvageHarvest"/> <drop event="Harvest" name="resourceScrapIron" count="20,100" tag="allHarvest"/> <drop event="Destroy" count="0"/> <drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/> <property name="Stacknumber" value="10"/> <property name="TakeDelay" value="10"/> <property name="EconomicValue" value="444"/> <property name="FilterTags" value="fdecor,felectrical,ftraps"/> <property name="SortOrder1" value="70a0"/> </block> Link to comment Share on other sites More sharing options...
stasis78 Posted January 25, 2019 Share Posted January 25, 2019 I’m guessing that it could be your multiblock dim needs to be larger. You have to be inside the block to take damage afaik Link to comment Share on other sites More sharing options...
xyth Posted January 26, 2019 Share Posted January 26, 2019 I'm pretty sure you will need custom C# code to calculate the collision. We needed that on our moving traps in Starvation. Link to comment Share on other sites More sharing options...
Sorrowthief Posted January 26, 2019 Author Share Posted January 26, 2019 I'm pretty sure you will need custom C# code to calculate the collision. We needed that on our moving traps in Starvation. DOh everything I want to build has script requirements lol Link to comment Share on other sites More sharing options...
stasis78 Posted January 26, 2019 Share Posted January 26, 2019 That’s why I suggested you change the block dims Link to comment Share on other sites More sharing options...
Sorrowthief Posted January 26, 2019 Author Share Posted January 26, 2019 That’s why I suggested you change the block dims Yeah Ill give that a try as well thanks for that Link to comment Share on other sites More sharing options...
stasis78 Posted January 26, 2019 Share Posted January 26, 2019 It’s hacky I know. And won’t give the desired effect but it should work I think. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.