Help! Can't get computer to collect items.

MedaForceMedaForce Member Posts: 2
edited November -1 in Working with GS (Mac)
I'm trying to get a computer controlled player to go around a level collecting coins before the human player can collect them. I'm having some trouble trying to get this to work. I've tried a few things but haven't had much success. I've tried the the TargetX/TargetY that is suggested when dealing with having a enemy go after a player but when I tried applying it to multiple coins it just shots upwards collects two and then gets stuck on a wall. Is there maybe someway to have it so it would goto the nearest one?

Also on a small secondary problem, is there anyway to prevent the computer controlled player from just flying around and actually uses the controls that I have programed in for the actual player. The game is a side-scroller platform and not top-down and right now I am using an accelerate to act like gravity and it works great when you have actual humans playing, but when I have the computer take over it seems to ignore it.

Any help would be greatly appreciated.

Comments

  • MedaForceMedaForce Member Posts: 2
    Bump, Any help :(
  • JeffreyShimaneJeffreyShimane Member Posts: 372
    Maybe you could try use an attribute that tracks which coin is the current target so that the computer-controlled player only has 1 target at any given time. For example, you have an attribute called target that gets incremented +1 each time the computer-controlled player collects a coin. If target=1, the computer-controlled player goes after the first coin. Once the first coin is collected, target gets incremented +1 to 2 so the computer-controlled player goes after the second coin. I've never tried something like this before but maybe having only one target at a time will keep it from getting confused about what the target is. Good luck!

    - Jeff
  • DrGlickertDrGlickert Member Posts: 1,135
    You could try some Magnitude features. However, you have to constrain them and it eats a lot of processor. If you have a ton of coins (like over 50 or so) then it might eat a lot of processor. If it's like 10, then that might be okay.
  • marry510marry510 Member Posts: 3
    You almost do not recognize him at first because she plays a victim of abuse to which Dexter saves the team of serial killers. But yes, the actress Julia Stiles, who joined Dexter throws this season and has done a bang-up job leads to another show.I still experience all the new novels by Dexter seems to be followed not only possible reasons. A significant number of characters in novels who are alive, they were killed off the show. I have not read the novels, when they come out and watch the show when it comes out. However, now I think of them as "related" only works. The bones do not show the same thing, only with some kind of Kathy Reichs novels. If you do not like shows and books are so far apart and have been watching the show, I can not wait to read all the books in one gulp as big as a different experience.There are many subplots going well, and Deb, his sister, a detective in the treatment of their partners, over the murder of Rita suspects Dexter.
    ---------------------
    Dexter DVD
    Supernatural DVD
    The Vampire Diaries DVD
    How I Met Your Mother DVD
    Sons Of Anarchy DVD
Sign In or Register to comment.