This is our newest level and probably the least polished. We’d love to get player feedback about difficulty and fun.
Had a little go at this, got there in the end
I was working in JavaScript, and when it started the sample code was some Javascript, but then a Python (probably) if block, and a function using self
It seems to be a tricky balancing act with this level in terms of having the time to get into position, build the trap and then get out of there before it goes off. I found I was building the third trap too low down, so by the time the ogre got to it I was still standing next to it.
I guess there is more going on behind the scenes, but it felt like it could break quite easily, because the code we write/see doesn’t explicitly wait for someone to turn up in one of the entrances, then it feels like the hero could move past the entrance without waiting to see if anyone turns up there - that doesn’t seem to be the case, I guess this is handled behind the scenes?
Overall though quite a nice level I thought, provides a good way of using a loop, and of using if blocks.
I enjoyed this level (and all of the levels leading up to it). When I completed the level, the game did not acknowledge that I had completed the goals, though and did not award me with experience.
I am looking forward to new levels! This is a great site and an awesome learning opportunity.
@herbertscience Try again now–I think I’ve fixed the goals on this one.
It took me a while to figure out that it was a mine and not a time-bomb.Initially I though the bomb would go off after 2 seconds or so .But I successfully completed this level using the loop … it was a little tough because most of the times the bomb would explode right in my face But as soon as I figured out that it was a mine I was able to complete it in no time
And as @matt said there was some python as well as java-script code in the default code.
I would say that this level is around 1.5 to 2 stars on difficulty
Just a small note, I reset the Javascript code on this level, and its closer, but the if is missing brackets (unless thats intentional)?
I did have a little look at the level editor to see if I could submit a patch for this, but couldn’t find where the scripts were set up, happy to give it a try if you could give me a pointer to where the default scripts are?
Oh, right! I have fixed it. For future reference, you can find the sample code by double-clicking a Thang, then drilling down into its programmableMethods like so:
Great, thanks. I’ll know where to look if I see anything like this again
Hi
I am stuck in this level as well, but it doesn’t even seem to recognize the ogre at all… I am using google chrome.
I havent even started and I already have "line 9 : undefined is not a function.
Please help
@StHoly89 Do you have all the required gear for this level–builder’s hammer, crude wooden glasses, leather boots, and Programmaticon II? Try making sure all that got equipped properly.
If not, let me know whether you are using Python or another language, or whether switching your hero helps.
I got through it somehow… I did change the weapon, but first time I did it, it didn’t recognize it. I redid it again and it passed…Thanks!
Hello, I have been stuck on this level for four days now. I have tried reloading and exiting and deleting everything. Line 6 when it starts up, has a problem. Something about self.moveXY(43, 50) is not working and it is the example code. Please help me, my character Anya won’t even move, and it is becoming a little frustrating. But on the contrary, awesome game!
post your code so somebody can look for you
Also check to make sure you have the leather boots equipped; they’re what grant the moveXY
skill.
So I can’t beat this level for some reason. I patrol around and kill 5 ogres and 0 villagers die and I take 0 damage. However, when the 6th ogre spawns I simply get a ‘Fail’ with both goals failing. Code below (js):
// Patrol the village entrances.
// Build a "fire-trap" when you see an ogre.
// Don't blow up any peasants!
loop {
this.moveXY(41, 47);
var topEnemy = this.findNearestEnemy();
if (topEnemy) {
this.buildXY('fire-trap', 43, 50);
}
this.moveXY(28, 34);
var leftEnemy = this.findNearestEnemy();
if(leftEnemy) {
this.buildXY('fire-trap', 25, 34);
}
this.moveXY(41,24);
var botEn = this.findNearestEnemy();
if(botEn){
this.buildXY('fire-trap',43,21);
}
}
Are you sure a peasant didn’t get blown up? If you saw an ogre right before it was dying from a mine on the left passage and then placed a mine on the bottom passage (instead of because you saw one on the bottom passage), that might do it. Try moving to 43
instead of 41
when trying to scout for the bottom trap.
I have a problem in the 0:35 sec. Even with the correct function, it add a pump and i lost the game.
I think it is a bug…
@fabio20rj I checked it out, and looks like the problem is in your code here:
self.moveXY(43, 20)
leftEnemy = self.findNearestEnemy()
if topEnemy:
self.buildXY('fire-trap', 43, 20)
You are defining leftEnemy
as the variable name for your bottom enemy, and then you are checking topEnemy
in your if-statement for the bottom. They need to be the same.
Thanks, I will modify my code now…
Okay so i was just about to post my code and i logged on and Python looked like it changed. I have no idea how to use this new version even though i was used to @fabio20rj type of code. It says i am using Python but I’m not. Help then i will post my code.
Also, I was wearing my upgraded boots