[Adventurer] Air Bridge


#1

Hi! Here is the new level Air Bridge.

This level is a demonstration of one more advanced pet – the Griffin Baby. That pet can carry units so it gives you a lot of new tactical opportunities.


#2

Great level! Can’t wait until the Griffin Baby is released! So many cool stuff you can do…

[INCOMING DELIVERY] :eagle: <== griffin
(lol wheeeeeeeeeeee!)>:walking_man: <== peasant
:astonished: :smiley: <== others :ocean::ocean::ocean::ocean: <== the river


#3

Very fun. One minor issue, you use the variable name remainedPeasants, that should probably be remainingPeasants.

Otherwise, much fun! When do we get to actually use these new pets?

Also, I’m annoyed that arrows can’t pass over water…


#4

Probably because of the obstacle things the level creators put there…


#5

Great Level @Bryukh

A problem I found was that I tried to find the nearest weak ogre, or munchkin. My code:

           var ogre = pet.findNearestByType("munchkin");
           pet.carryUnit(ogre, 40, 19);  

However, sometimes, the munchkin would spawn at the top of the screen, next to my hero, so the pet griffin would fly to carry it, but the munchkin would die from a swing of my hero’s sword before my pet griffin can grab a hold of it. When it finally does grab a hold of a munchkin, it occasionally gets stuck trying to carry the ogre past the building in the top right section (the one with a little red cover outside its house).

This is not a problem because my hero has top tier armor an can survive long enough for the baby griffin to finagle its way around the house, but I did some tests with some lower level armor and indeed, my hero cannot survive this long. If you want to, I can private message you my full code as well as the armor I used.

Other times, the griffin will get stuck deploying the munchkin because it is trying to find the nearest ogre and drop the ogre onto the minefield at the same time.


#6

That’s why I placed some munchkins in the bottom-left part of the screen. Use them :wink:


#7

Thanks! Will fix.

It is restrictions of the colliding system. We can change it but only by performance price.


#8

@Bryukh Ah, I see :wink:

Make sure you put that in the Hints so other people don’t make the same mistake I made.


#9

Nice level I like how the Griffin Baby hold unit.


#10

please help me with this level im stuck

# Help peasants to escape.





def onSpawn(event):
    # We need to save three peasants.
    remainingPeasants = 3
    while remainingPeasants > 0:
        # Take a good position.
        pet.moveXY(40, 55)
        peasant = pet.findNearestByType("peasant")
        if peasant:
            # Carry the peasant to the center passage.
            pet.carryUnit(peasant, 40, 34)
            remainingPeasants -= 1
    # Next find a weak ogre and carry it to the fire traps:
    #define globals
    enemies = hero.findEnemies()
    enemyCount = 0
    minHealth = 0
    weakEnemy = None
    #find weakest enemy
    while enemyCount < len(enemies):
        
        enemy = enemies[enemyCount]
        enemyHealth = enemy.maxHealth
        if enemyHealth > minHealth:
            minHealth = enemyHealth
            weakEnemy = enemy
            
        enemyCount += 1
#carry the weakest enemy
pet.moveXY(weakEnemy.pos.x, weakEnemy.pos.y)
pet.carryUnit(weakEnemy, 41, 17)

pet.on(“spawn”, onSpawn)

Fight!

while True:
#find enemy
enemy = hero.findNearestEnemy()
#if enemy, attack
if enemy:
hero.attack(enemy)


theres my code

#11

sorry about that didn’t notice just complete