How do you use boss star 1

i need help with using the boss star 1 pls help

What do you need help with? :slightly_smiling_face:

In what ways? Commanding? Summoning?

i need help with commanding

You can click here on the Boss Star’s methods. I have highlighted it by inverting the color. (I use a Boss Star III but Boss Star I works pretty much the same way, just with less units to command and fewer commandable methods.)
Something like this will pop up once you click a method (in this case, command()).

Some come with a brief tutorial on usage, like this, for instance.
I hope this helps you :slightly_smiling_face:

but when i command and summon command says find friends when i did that it says agan find nearest friends

but when i command and summon command says find friends when i did that it says agan find nearest friends

here’s an example code:

for friend in friends:
    if friend.type=='artillery':
1 Like

i want to have it easier
pls :grinning:

1 Like

Try this:

while True:
    if soldier:
        hero.command(soldier, defend,self)
1 Like

ok trying it (20 chars )

it doesn’t work (20 chars)

Mod edit: [Please do not post working code]

@Benjamin_van_den_Bra I forgot that you use Lua. Anytime you ask another question, remember to at least tell us what programming language you are using. If you don’t, you’ll probably get answers in python, where most of the code won’t work in Lua.

I recommend switching to python if you are a beginner. The documentation and examples for the Lua commands (the API list that Hellenar posted pictures of) aren’t completely developed.

How to use the Boss Star I (Lua)
-- Boss Star I -- How to use, Lua version

-- To summon a soldier:

-- Summoning units costs gold.
-- So, you should probably check if you have enough gold first:
if >= hero:costOf("soldier") then

-- summoning as many soldiers as you can afford:
while >= hero:costOf("soldier") do

-- The Boss Star I can only command soldiers and archers
local friends = hero:findFriends()
for i, friend in pairs(friends) do
    if friend.type == "soldier" then
        hero:command(friend, "move", hero.pos)
    elseif friend.type == "archer" then
        hero:command(friend, "move", {x=15, y=15})
-- The Boss Star I has only 3 types of commands:
-- "move", "attack", and "defend"

-- "move" examples
local friend = hero:findNearest(hero:findFriends())
hero:command(friend, "move", hero.pos)
hero:command(friend, "move", {x=15, y=15})

-- "attack" example
local enemy = friend:findNearestEnemy()
if enemy then hero:command(friend, "attack", enemy) end

-- "defend" example
hero:command(friend, "defend", hero)
hero:command(friend, "defend", {x=15, y=15})

(continued ramble) Ok, I’ve worked with Lua before I played CodeCombat, but there is barely anything documented over here. You have to search for documentation elsewhere if you want to learn Lua. Learning Lua on CodeCombat as your first programming language is definitely not beginner friendly.

but boss star 1 says that i can summon a archer but i cant do it

Nope, you can only command archers with the Boss Star I.

Screenshot (38)

-- works:
hero:command(archer, "move", hero.pos)

-- does not work:

now i understand that thx