[SOLVED]Greed Traps Help Please

Hi,

I need some help with the level “Greed Traps” here is my code and my hero is Amara Arrowhead:

Hello, could you please send me the link to this level?

yes here @Anonym : Greed Traps

Thanks, I’ll take a look!

Ok thanks for helping me!

Ok, everything seems alright except for the function.
You don’t need to check if item type is coin.Just write:

if item:

Oh ok. Yeah I forgot about that here is my new updated code:

I will try it now! thanks!

Change this:

item = hero.findNearestItem()
if item and item.type =='coin':
    #your code

to this:

coin = hero.findNearestItem()
if coin:
        hero.buildXY("fire-trap", x, y)
1 Like

Hi I used my code and I won! But I will try that out too! Thanks for your support!

Ok, mark the post that helped you the most as solution.And congratilations on completing the level! :partying_face: :partying_face: :partying_face:

1 Like

Thant works Too. Thanks!

Then do this
so that the topic will close

1 Like

yup just did it! Thanks, @Anonym for the support

2 Likes

You’re welcome!
(200000)

2 Likes

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