[SOLVED] Airbender Please Help

Here’s my code:

# Use hero.forcePush() to push skeletons into fire-traps.
while True:
    skeleton = hero.findNearest(hero.findByType('skeleton'))
    if skeleton and hero.isReady('force-push'):
        hero.forcePush(skeleton, Vector(1, 0.5, 1))

And here is my gear:

Try this:
hero.forcePush(enemies[2],Vector(1, 0.5), 1)
To make Vector directions you need () for the coordinates and then you write the forceRatio.

here’s my code:

# Use hero.forcePush() to push skeletons into fire-traps.
while True:
    skeleton = hero.findNearest(hero.findByType('skeleton'))
    if skeleton and hero.isReady('force-push'):
        hero.forcePush(skeleton,Vector(1, 0.5), 1)

My hero force pushed a skeleton and don’t move.

I have tried hero.forcePush(skeleton,Vector(1, -0.5), 1) too.
It can beat two skeletons

But it just can save one paladin

Oh, yeah, sorry. Next message is ok.
I’m pretty sure you don’t need isReady here because forcePush’s cooldown is only 2s.
How about this? hero.forcePush(skeleton, Vector(0, 1), 1)

Code=

while True:
    skeleton = hero.findNearest(hero.findByType('skeleton'))
    if skeleton:
        hero.forcePush(skeleton, Vector(0, 1), 1)

I finished the level, now I know that I don’t need a while true loop :laughing:

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.