Kelvintaph Burgler chieftain too strong

Like the title says. I can get my allies past the yak without taking damage, but the chieftain kills them before I can get more than 1 heal off from my paladin. Even if the paladin is defending, he dies in 3-4 hits. Even if I damage the chieftain, the witch heals him. If I go for the witch first, the chieftain kills everything before the witch dies. Has anyone beat this level without purchasing power up items?

Here’s a tip: The Chieftain’s attack is area of effect. And a Yak attacks anything that attacks it. So if you send in a unit and the Chieftain goes for it…you we where I’m going here?

thanks, I wondered if that would do it. having the paladin is kind of a red herring I suppose, don’t even need him to heal or do anything other than attack the witch after the yak kills the chief.

i beat the level but i had another question, one i’ve been trying to figure out for a few days now: is there a way to dodge incoming missiles without having a goal vector? like, in burgler i dodged the missiles by having my avatar constantly moving between two goal vectors while avoiding the missile vectors, and in the prior level (yak dodging) my avatar would dodge yaks while constantly moving towards the end goal. How can you dodge stuff without having a goal in mind? Is there a way to dodge with vectors while standing still?

I used distanceTo to detect the projectile, then moved up or down depending on how close I was to either wall. That’s one way without using vectors.

You actually use vectors without knowing it :slightly_smiling:

The key is to take the direction in which the thing to avoid moves, then rotate it by Math.PI/2 (that’s 90 deg) to get the sidestep direction. Move in the sidestep direction.

If the thing to avoid moves horizontally, then you will sidestep vertically without realizing you had to compute a vectorial rotation.

1 Like

there we go, that’s what i was looking for. so how do you rotate the vector 90 degrees… do you use Vector.multiply(avoidThingVect, Math.PI/2)… nah that wouldn’t work would it… but how else would you multiply the vector… is there a math function that does it?

my_rotated_vector=my_vector.rotate(Math.PI/2);

Remember that all vectors are considered starting from origin. To get position from a vector you must replace the origin with your origin position:

position_to_go=direction.add(my_current_position);

Therefore:

//missiles have a constant speed and they go forever until they hit something
//You must write your isMissile function. Look if the projectile's type 
//or if it has a defined targetPos
if (isMissile(projectile))
    direction=projectile.velocity;
// else, lobbed shot: they do not have a constant velocity but have instead 
//a intended target
else
    direction=Vector.subtract(projectile.targetPos,projectile.pos);
sidestep=direction.rotate(Math.PI/2);
// check if you can run in that direction. 
//Multiply with -1 to run into the opposite direction
sidestep.multiply(step_length/sidestep.magnitude());
run_position= sidestep.add(this.pos);
1 Like

wooo thanks, that’s awesome! tyvm

I’m still having a tough time with vectors… is there a gui somewhere that would let me play around with vectors and see them drawn out as lines while the program is running?

edit: nvm, I’m playing around in level Circle Walking with the ring that creates flowers behind you while you walk, and self.saying the vector that I’m heading to. it’s helping a LOT.

Hi

How can I make the two robots hit each other? I think the program has the right idea, but there’s an error i can’t place.

    robotWalker = self.findByType("robot-walker")
    robot = self.findByType("robot")
    moveToPosTimes2 = Vector.subtract(robotWalker.pos,robot.pos)
    moveToPos = Vector.divide(moveToPosTimes2/2)
    self.move(moveToPos)
    self.say("Hit me with your best shot!")
    self.moveXY(36, 12)

Wait, how do you figure out if it is a lobbed or Projectile?

findByType returns a list.

Since there are two robots in the level, you can do:
mean(a,b) = (a+b)/2

robotWalker = self.findByType("robot-walker")
moveToPos = Vector.add(robotWalker[0].pos, robotWalker[1].pos)
moveToPos.multiply(0.5)

Each enemy has a different type of projectile. Only the catapults and balistas have lobbed projectiles.

I tried the splash damage yak thing. the splash clearly hit the yak, but the yak still just stands there.
What?

You have to lead the troops, preferably the Paladin, into the yak’s lair. Then the Yak will kill the chieftain.