Would it be possible to create a floor, that when you walk on it, it will electrify the player or zombie. Also that you can hook on the battery bank. Anyone manage to do it?
Well I manage to make it work, with the code BuffsWhenWalkedOn, but this way you don't need the generator or battery bank. And since it's easier to put the plating floor on the ground then hooking all the post, the fence post will be useless. That's why I will prefer to force the player to use the electricity to hook them, then found a few battery to make the floor plating and set it on the floor without having to take care of it except for repairing it. :moody:
Hmmm, not sure if it's possible to do - I wanted to do something similar to this for FennecMod.
Here's an idea I have though that could simulate a solar powered version that only works outside...
Make 2 blocks: SolarFloorUnpowered and SolarFloorPowered.
Make SolarFloorUnpowered the class="UpgradeRated" and SolarFloorPowered a regular block.
Give SolarFloorUnpowered an upgrade rate of about half an ingame day and it then turns into the powered variant. This simulates it 'charging' from solar energy.
Apply the shock buff to the grown variant only, and set it to damage the block a little when walked on as well. Look at the spikes code for this.
Set the downgrade of the grown block to become the unpowered variant again.
You may need to set a new material in materials.xml to customise the HP of the blocks and ensure they require direct view of the sun by specifying them as plant types. You could therefore ensure they are placed outside.
Now for the recipe: This gives the unpowered variant and must be placed down and it will upgrade.