Blazing Battle strategy trading chat!

as in, hero.setNextWaveTypes[“robobomb”]

One type works. Just the braket problem.

1 Like

I had noticed that too. I just wasn’t sure it was a problem.

1 Like

No you need to do hero.setNextWaveTypes(["robobomb"]).

If you look at the default…
hero.setNextWaveTypes(["robobomb", "robosoldier", "roboranger"])
It has parenthases ( ) and brackets [ ].

1 Like

Maybe but I think that is spam.

was to tell the computer it was a complete sentence. is what happens if 2 brackets are right next to each other.

Maybe you should define a function called onWave

def onWave():
  hero.setNextWaveTypes(["robobomb"])

and say

hero.on("wave", onWave)

It seems to work that way, have you tried it?

Hi! I’m a student, and I was curious how to find a specific enemy type in an array and create an if statement with that information. Specifically, when there are fire elementals, I want to replace one of my fire walls with an attacking unit.

How do you get the big towers?

1 Like

Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!

Which big towers? plz be specific.

And the hints tell you all the diff types of towers and their stats, you can test em out and see which one you need

Build the same tower on the same spot a few times.

cool thank you just need to try it

thank you (stupid little characters)

@JibeBot Hello and welcome to the discourse!

🤔 I'm not sure there's a way to do it quickly, but the level Taunting could be helpful.

You can use:

hero.findByType("")

and put the object type as the string (returns an array of the objects)

3 Likes

I had an idea.
I am making a while True loop that checks whether the array has any contents. The only problem is, I don’t know how what the array returns as if it finds nothing. Do you? I’m going to test it out.

Dunno if this would work but maybe

if arrayitems == 0:
    #run your code
1 Like