School Project Help Please!
For my class, I get to design a Alice program of my choice. I am making a western town with a buffalo walking around. I have the buffalo being moved by the "Let the arrow keys move ____" command. I want to make is so the buffalo can't walk inside of buildings, but I have no idea how to. I've tried using commands like "If buffalo is within 2 meters of salloon move buffalo 10 meters backwards" but they don't work. Does any one have any ideas?
|
We will wait for their answers. :) I wish i could help.
[URL="https://casinowatchmi.com/"]click here[/URL] [URL="https://casinowatchnj.com/bally-casino/"]nj casino[/URL] [URL="https://casinowatchpa.com/"]visit here[/URL] [URL="https://shairavermund.tumblr.com/"]unibet pa[/URL] [URL="https://casinowatchnj.com/caesars-casino-online/"]casinowatchnj.com[/URL] |
1 Attachment(s)
[QUOTE=meezcat;52620]For my class, I get to design a Alice program of my choice. I am making a western town with a buffalo walking around. I have the buffalo being moved by the "Let the arrow keys move ____" command. I want to make is so the buffalo can't walk inside of buildings, but I have no idea how to. I've tried using commands like "If buffalo is within 2 meters of salloon move buffalo 10 meters backwards" but they don't work. Does any one have any ideas?[/QUOTE]
hmmm... Well try doing what I'm doing for my pokemon game. I would use cubes for collision detection. It would be in a method that would be 'while the world is running'. Here's the pokemon game to show you what I mean. Move with the arrow keys. Tell me if this works. (and if you like the pokemon game, even though it's 99% unfinished) |
Thanks for your response fourbros! Your game is very impressive so far! I tried what you used for the hit detection, but it won't work on mine for some reason. I think I coded it properly, and logically it all makes sense, but for some reason it will not register that the buffalo is comming in contact with the box.
|
I resized the cubes for my game. You may have to change the 'distance from the cube' to fit your game.
|
I got it to work! I was using the distance between the object's centers rather than their depth's. Thank you for your help!
|
I'm glad my advice semi-worked for once.
|
[QUOTE=fourbros;52623]hmmm... Well try doing what I'm doing for my pokemon game. I would use cubes for collision detection. It would be in a method that would be 'while the world is running'. Here's the pokemon game to show you what I mean. Move with the arrow keys. Tell me if this works. (and if you like the pokemon game, even though it's 99% unfinished)[/QUOTE]
thanks for help |
All times are GMT -5. The time now is 04:40 AM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.