Psuedo Health for Textboxes [and other mechanics for tower defense]

oh

So we have an enemy on track space 1. We want it to ‘move’ to track space 2. To do this, we need some sort of function to make the value in space 1 transfer to space 2. Meanwhile, a new value transfers on to space 1. The real issue is that some enemies are faster and need to move down the track faster (up to triple the speed of a level 1 enemy) but they are contained in the same value for the space.

After typing that out, it has to be easier to have two different properties for each space, so then you can control the two items separately. But we still need to transfer the values from one spot to another.

We can also use the two spots for a targeting bonus: We can make it so the more powerful enemy goes into the primary slot and is targeted first.

As you said, you have 2 different properties. You multiply by 10 for one and 100 for the other. 10^x, where x is the speed.

What if I had a recursion system for each speed (higher delay for slower speed) that uses a checker to check if the value is the type of speed and if so just sets the next space to that value?

The first issue I could think of was if I linked the front of the track up first the enemies would travel it in a single cycle. I can make it in reverse to avoid that. (this has something to do with advanced channel order)

Idk what’s better. Generally, with text displays, you want to avoid recursion as much as possible.

1 Like

Why

You need as much computational space for rendering the text.

1 Like

Great to know.

I’m going to start building this part of the system and will check back in when it breaks or is finished.

1 Like

Wait, 5k is the prop limit?

1 Like

Yeah. There’s a prop limit. And why is this in devices?

To deter people from entering it

Ok.

Oh WAIT!

Now that we have for loops (though apparently we had them a long time ago) if you have a list of enemies, you can iterate through it and replace each thing. You can have two temporary counters, one stores the enemy id from the space youre trying to replace, and one moves it to the new area.

Ok, nevermind, I dunno what I’m saying. But for loops should help somehow.

1 Like

honestly I barely remember why I needed one in the first place

1 Like

You should move this to help, and not devices.

It’s a devices thing. Devices is where the technical stuff goes.

1 Like

I guess.

1 Like

devices also have solutions right

1 Like

Yes.

If you read both the admin options guide and my voting guide, you’ll see a for loop in both…