[Adventurer] Adventure Time

The level Adventure Time is ready for testing.

It takes place in the Game Dev 2 campaign, and demonstrates spawning enemies over time using game.time.

1 Like

This is a great and simple level which allows users to see the code. I like it.

I am sad that I only got 10XP and no gems.

Only for subscribers?

Adventurer levels are usually ā€œfreeā€, at least until they go public…

We de-adventurer-ed a bunch of Game Dev levels recently, and this one got caught up in the sweep. It should be fixed now, and available for testing.

no issues, nice level

Are you sure? I got some gems…

@Catsync

Either way, I think it’s a great level for beginners!

I think it is fun, though i got little gems :anguished:

Unfortunately, no matter which way I tried, the guardian wouldn’t attack the munchkins. The code to attack the munchkins was already in place when I loaded the level, so perhaps it’s a bug? I’m doing the Python version, and this is the code I’m talking about.

def onSpawn(event):
    while True:
        unit = event.target
        enemy = unit.findNearestEnemy()
        if enemy:
            unit.attack(enemy)

game.setActionFor("munchkin", "spawn", onSpawn)

I couldn’t pass the level because even though the code looks correct, the guardian wouldn’t attack the munchkins. The other aspect, which is the spawning of the munchkins, worked just fine. Maybe it’s a bug? All the previous levels worked fine.

Howdy and welcome to the forum!

Actually, you don’t need attack code in the game devs…just click on the munchkin and your guardian will attack.

Thanks for your help! It worked when I clicked on them. Maybe I’m just dumb. However, the code I referred to above doesn’t seem to hint at needing to click them; it appears as if it should automatically attack them. Maybe I’m reading the code wrong? I’m a beginner after all.

1 Like

You are quite welcome! Honestly, I don’t remember if/where it was ever stated. However, think of the game dev levels as where you code for the player…what are they going to do when they attempt to play your ā€˜game’? They are going to start clicking everything, aren’t they :wink:

I think your code was good, that which you posted above, just a little misplaced…you are not the only one to get thrown off track by not needing to design attack code. Besides, every single one of us was a beginner at some point too :slight_smile: