Added: 10 months ago
From: JoshTheSerious
Views: 764
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (4)

Sign In or Sign Up now to post a comment!
  • hmm

    Josh thx. I don't use the move(); but then when the greeps at ship they stop also.

    I have 2 other questions

    1. How you make that one greep of you is waiting in the center of the pille? and how you make that the greeps turn back to the pille if they dropTomatoes at the ship?

  • @kurdo4104

    Hi Kurdo

    Please follow the basic tutorial in the comment section of my greep video 4.1. This should get you on the right track. You can improve your code from there.

    To make your greep move to the center of a tomato pile just get the tomato pile object (like in the code you posted before) and then get the coordinates of it's center using getX() and getY(). Once you have those coordinates you can tell your greep to move in that direction.

  • hi with which code you stopped a greep on the tomato pill? pls send me a pn i have try it with /** * Is there any food here where we are? If so, try to load some! */ public void stopatTomatoes() { // check whether there's a tomato pile here TomatoPile tomatoes = (TomatoPile) getOneIntersectingObject(Tomat­oPile.class); Greep greep = (Greep) getOneIntersectingObject(Greep­.class); if ((tomatoes != null)&&( greep == null)) { but it hasn't the same effect
  • @kurdo4104

    Hi Kurdo

    To make your greep wait at the tomato pile you simply don't use the move() command while you see tomatos. You only start moving again as soon as you have a tomato on your back. I hope this helps.

    Josh

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more