How To Make Barriers With Buyable Health (Difficulty 2/10)

This guide will help you add a durability aspect to your barriers.

Concept
This will increase a property for the barrier that will go down when the barrier is killed. When the property is 0, the barrier doesn’t respawn.

Warning
Barrier healths can only be integer multiples of the beginning health.

Guide
First, put the barrier prop down and configure the health to whatever you want. Next, make it so that whenever the barrier prop is destroyed, deactivate a barrier device. After this, wire the barrier prop to a counter, and make it so that the counter decrements when the barrier prop is destroyed. After that, make the counter change a number property. When the property changes, it should broadcast on a channel that triggers a trigger. In the trigger’s blocks, it should check if the property is > 0. If it is, then is should broadcast on a channel that activates the barrier device and prop.

You can make this a castle wall upgrade by having properties for each wall, and using concatenation and for loops to increment each wall’s property.

Here is a guide for making a for loop:

5 Likes

Nice wip, @getrithekd! (will like once completed)

3 Likes

Thanks!

Nice guide so far!

1 Like

Bump!