GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing minecraft.makecode.com — Agent Moves Agent MovesIntroductionGet your agent to move. In this tutorial you give your Agent some turns and moves to really dance!
Teleport your AgentBring your Agent near you so you can watch it dance. Teleport the Agent to your position but move it forward by Run the program and look to see that your Agent comes close to your position. Make a dance moveTo make the first dance move, add in an if else. When the condition in the if is true, have the Agent move forward by Add the dance logicAdd another if else below the previous one. For the case when condition in the if is true, have the Agent turn right. For the else, have the Agent turn to the left. Randomize the movesWell, these moves are fairly predicable. Add some randomness to the Agent's moves. Replace the true in both of the if conditions with a random logic value. Set the condition as a comparison of a random number between Add a loopThe Agent can now make one random dance move. Make the Agent really get the moves going by repeating them in a loop. Put the two if else portions of the program in a for loop. Have the loop repeat Slow down the dance!Wow, that was a fast dance! The Agent can really bust a move. Add a pause to slow the Agent down. Set the pause time to
|
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |