Use your new skill to choose what to do: self.now()
loop:
# If it’s the first 10 seconds, fight.
if self.now() < 10:
pass
# Else, if it's the first 30 seconds, collect coins.
# After 30 seconds, join the raid!
Use your new skill to choose what to do: self.now()
loop:
# If it’s the first 10 seconds, fight.
if self.now() < 10:
pass
# Else, if it's the first 30 seconds, collect coins.
# After 30 seconds, join the raid!
Hello, Asik, and welcome. Please read the FAW and format your code properly.
What, exactly do you need help with? You tell us you need help, but we can’t help you with a problem we don’t know about.
and how to understand? you can not help me?
We can help you but we don’t know what you need help with?
I can not pass this level : Keeping time ! and I ask you for help
I do not understand how to use the command self.now
Just setup coin collecting forever I didn’t take the time to do the self.now()
Ah, here we go.
self.now()
, when you call it, returns the number of seconds the level has been playing. For example:
if self.now() < 10:
#Collect coins!
For a better description, look at your Simple Wristwatch in the level.
Can you write me what commands you need to enter to complete this level
That works perfectly so… I used the simple collect coins code with if self.now() < 10:
I actually don’t know how to end it.
I personally think you and other people should try it out a little longer to get the feeling if you just get the answer you won’t know how to use it.
and to add to Magicfloatingcows comment, if you just copy code for this level you will just be back next level to ask again.
The only “new” thing for this level is using the watch to tell the passage of time and how to do that WAS GIVEN TO YOU, by the default level code. Anything else you need to do could be copied from previous levels. (I know, I know, I just said to copy stuff, but from yourself is OK)
FAW? I believe you mean FAQ
what is the actual full code for this level??? (any code is fine)
The “actual full code”, as you put it, is not allowed to be given. Do you need help with this level? If so, then give us more information on what you need help with. Your code, formatted properly (read the FAQ before posting). A screenshot of your error, if any.
whats wrong with this the flags are not working
``// Use your new skill to choose what to do: this.now()
loop {
// If it’s the first 10 seconds, fight.
if (this.now() < 10) {
var enemy = this.findNearest(this.findEnemies());
if (enemy) {
if (this.distanceTo(enemy) < 10) {
if (this.isReady(“cleave”)) {
this.cleave(enemy);
} else {
this.attack(enemy);
}
}
}
// Else, if it’s the first 30 seconds, collect coins.
if ((this.now() >= 10) && (this.now() <= 30)) {
var item = this.findNearest(this.findItems());
this.move(item.pos);
}
// After 30 seconds, join the raid!
if (this.now() > 30) {
var flag = this.findFlag();
if (flag) { this.pickUpFlag(flag);}
enemy = this.findNearest(this.findEnemies());
if (enemy) {
if (this.distanceTo(enemy)
< 10 && this.isReady(‘cleave’)) {
this.cleave(enemy);
} else {
this.attack(enemy);
}
}
}
}
}
``
(why isn’t formatting working)
doesn’t matter decided to rewrite code and completed it thnx anyway
I just didn’t follow the directions, but I finished!
if self.now() < 10:
self.attack(enemy)
pass
elif self.now() < 60:
code combat is glitched for me it always says its wrong even simple codes like
loop:
enemy = self.findNearestEnemies()
self.attack(enemy)
says that i need to target a unit
it used to work but it does not now:disappointed:
Have you tested if enemy is not null?
self.findNearestEnemies()
will not return an enemy if there is no enemy on the screen. Put an
if(enemy)
before attacking