Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Alpine rally help!

type or paste code here
while True:
    if hero.canCast("invisibility", self):
        hero.cast("invisibility", self)
        pass
        
    
    if hero.canCast("haste", self):
        hero.cast("haste", self)
        pass

while True:
    if hero.canCast("haste", self) and hero.hasEffect("invisibility"):
        hero.cast("haste", self)
    else:
        Movetoeast = hero.move(Vector(self.pos.x +  10, 34))
    hero.move(Movetoeast)

can sum1 help me problem is hero not moving

Hello @Haris! The main problem you need to fix is the stacked while true loops. Try putting everything into one loop. Why? Because a while true loop will run forever unless you add a condition that breaks the loop at a certain point. This means that the reason your hero doesn’t move is because the first loop is constantly trying to cast invisibility and haste so your hero won’t move as it is in another loop that will never run. Try putting everything in one loop and then, if you have any more problems, I’ll see what I can do then.

1 Like
while True:
    if hero.canCast("invisibility", self):
        hero.cast("invisibility", self)
        pass
        
    
    if hero.canCast("haste", self):
        hero.cast("haste", self)
        
    if hero.canCast("haste", self) and hero.hasEffect("invisibility"):
        hero.cast("haste", self)
    else:
        iliketomove = hero.move(Vector(self.pos.x +  10, 34))
    hero.move(iliketomove)
1 Like

alr but this hero.move(iliketomove) keep saying (Target an {x: number, y:number} position. :no_mouth:

1 Like

@FalconX11_312 can u help me how do i fix this?

1 Like

Try moving first because the time it takes for Pender to cast both spells is enough time for her get herself shredded by the yetis - I think it’s the reason why the devs put that weird physics thing where she slides when she stops moving. Also, the has effect bit is unnecessary so try just casting haste in an elif.

Can i completing this level without using Pender SpellBane?

1 Like

You could, maybe using fast heros, but this level is designed for Pender and her fast speed

1 Like

you set iliketomove to hero.move(Vector(self.pos.x + 10, 34)) but why? iliketomove should have a value of the position, not the function you want to call with that position…
BTW, you can probably just do hero.move(Vector(self.pos.x + 10, 34)) instead of

    else:
        iliketomove = hero.move(Vector(self.pos.x +  10, 34))
    hero.move(iliketomove)

since it makes no difference.

I completed this level with Zana and the ring of speed :grin:

okkk i channgee that

can anyone suggest me to use any fast hero??
(edit)
do i need to buy Pender SpellBane?

You could use Arryn, Zana, with Ring of Speed
Or Naria might? be able to do it

yay i already finished this level using Pender Spellbane thankyou for yall help :slightly_smiling_face: