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
.
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
.
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
I think it is fun, though i got little gems
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.
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
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