Jump to content

Anyone have a working catapult trap or other traps?


Recommended Posts

Back in A15 or A16 there was a mod that had a catapult trap that launched zombies high into the air, maybe from Valmar. I really miss this trap so I wonder if anyone have anything like that laying around?
Im also looking for all kind of traps to add to my game, so if you have a trap I would love to get my hands on it. Will only be used privately :)


Link to comment
Share on other sites

I'm pretty sure the jumppad class is still in A19.  Just use a flat block and change its class.  This old A18 xml uses a custom block but you can use a vanilla block model instead:


        <block name="JumpPad">
            <property name="Shape" value="ModelEntity" />
            <property name="Model" value="#@modfolder:Resources/JumpPlate.unity3d?JumpPlate"/>
            <property name="Collide" value="sight,movement,melee,bullet,arrow,rocket"/>
            <property name="Class" value="JumpPad" /> 
            <property name="StabilitySupport" value="true"/>
            <drop event="Destroy" count="0" />
            <property name="Material" value="Mwood"/>
            <property name="ImposterExclude" value="true"/>
            <property name="ImposterDontBlock" value="true"/>
            <property name="CreativeMode" value="Player"/>
            <property name="CanPlayersSpawnOn" value="true"/>
            <property name="CanPickup" value="true"/>

Link to comment
Share on other sites

Thanks a lot, will try it right away :D
Can I ask what A18 mod that is from?

With help of JumpPad name I found this from A18, and I made it work in A19.

<block name="catapultTrap1">
    <property name="CreativeMode" value="Player"/>
    <property name="Class" value="JumpPad"/>
    <property name="Material" value="Mmetal_medium"/>
    <property name="DescriptionKey" value="catapultTrapDesc"/>    
    <property name="StabilitySupport" value="false" />
    <property name="Shape" value="ModelEntity"/>
    <property name="Mesh" value="models"/>
    <property name="CustomIcon" value="pressureplate"/>
    <property name="Model" value="Entities/Electrical/pressure_platePrefab"/> <property name="HandleFace" value="Bottom"/>
    <property name="ModelOffset" value="0,0.5,0"/>
    <property name="OnlySimpleRotations" value="true"/>
    <property name="ImposterExchange" value="imposterPlate" param1="143"/>
    <property name="CanPickup" value="true"/>
    <property name="TakeDelay" value="5"/>    
    <property name="RequiredPower" value="5"/>
    <property name="Damage" value="5" />
    <property name="Damage_received" value="5" />
    <property name="Group" value="Science"/>
    <property class="RepairItems">
        <property name="forgedIron" value="8"/>
        <property name="resourceMechanicalParts" value="1"/>
        <property name="resourceElectricParts" value="1"/>
    <property name="BuffsWhenWalkedOn" value="buffShocked"/>
    <drop event="Harvest" name="resourceElectricParts" count="0,1" tool_category="Disassemble"/>
    <drop event="Harvest" name="resourceMechanicalParts" count="0,1" tool_category="Disassemble"/>
    <drop event="Harvest" name="resourceSpring" count="0,1" tool_category="Disassemble"/>
    <drop event="Destroy" count="0" />
    <drop event="Destroy" name="Catapult" count="1" tool_category="Disassemble" />
    <drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
    <property name="Stacknumber" value="25"/>
    <property name="EconomicValue" value="950"/>

Link to comment
Share on other sites

The next issue is to try to make this trap more balance.
First I tried adding the need for power but that seem to be stretch.

Now Im trying to make it take damage as other traps do, but for some reason I cant get that to work either. Damage_received dont seem to work on any of the blocks above. Someone know how to do this?

Link to comment
Share on other sites

Very nice, thats interesting, will it still work today?

About traps receiving damage when interacting with zeds, and I thought the pressure plate did that, so I added the pressure plate to the catapult trap and the jump pad you posted earlier, but I cant get any of them to take any damage when zeds walk on them. I used the Damage_received setting that is used many places. Do you have any ideas how I can add any kind of damage to the catapult/jump pad, so they not last forever?

Link to comment
Share on other sites

21 hours ago, stample said:

I would try adding a direct damage component to the traps.  I suspect they don't take dmg if they don't inflict it, directly.

Thanks for your suggestion. I have looked at working traps and that seem to be the case, but for some reason using the pressure plate block I cant get any damage on them. I will look more into this, if anyone have any idea how to make this work, please share :)

Link to comment
Share on other sites

Ok, but I see many traps take damage when used, stepped on or when hitting zeds. And many traps from mods do that, but I see that those traps is unique and use dedicated blocks.

So how can I make traps that take damage and stop working after some time, can I reuse blocks from mods (its only for private use), or can I use vanilla blocks that take damage when stepped on like spikes?

Link to comment
Share on other sites

Each block can only have 1 class, which is its code base.  If you use the jumpad class, it launches the zombie but wont damage.  If instead you use the class TrunkTip, which will damage and decay like you want but wont launch the zombie.  To do both, you would merge those functions into a single C# class but then it would be a DMT mod.


You can do some trickery, like making 2 blocks, one that does each function, and configure them maybe like stairs so the first block would damage and decay and once it fully decayed it would destroy and drop the second one destroying it or dropping to an inert, upgradable version



Link to comment
Share on other sites


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

  • Create New...