Making baddies ala Pac-Man ghost style..

LogoLogicLogoLogic Member Posts: 51
edited November -1 in Working with GS (Mac)
Hi all. A beautiful day is shaping up here in the NW!

How do I make bad guys move and attack like the ghosts in Pac-Man? In other words some are more aggressive and follow you to the death and some slightly follow you and break and move off.
I want to do this. Help me obi-won....

Comments

  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    It's programming. You have to decide how to make the little minions aware of their surroundings and have a purpose in life.

    It's sort of hard to do in GameSalad until they add some more functionality to the tool. But you can program rudimentary AI by having the actor that represents your opponent check for your position and home in on it or fire at it.

    Good luck!
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    If you have a maze setup it will be tedious. If it is an open playing area it's not too bad. If you want a tilt to live type baddie AI just use vectorToAngle to get the angle between the baddie and the main player actor. This will not work in a maze as the baddies will just try to run through the walls and will just sit there and kind of shake. To do a pac man clone I would probably have different invisible actors throughout the scene that trigger an attribute change (I would call it checkpoint). So you would probably need rules in the baddies that say:

    Rule
    when game.PlayerCheckPoint=self.checkpoint

    ------(Insert vector to angle rules here)

    Rule when game.PLayerCheckPoint=1
    And when self.checkpoint=2
    ---(Insert rules that first gets the baddie into the correct angle and then use vectorAngle)

    Do this for all possible combinations of baddie checkpoint and player checkpoints

    HUGE PAIN IN THE ASS!!!
  • LogoLogicLogoLogic Member Posts: 51
    Thanks guys. I guess Pac-man is too difficulty with GS. Lol.
  • quantumsheepquantumsheep Member Posts: 8,188
    I'm pretty sure Wayne came up with a maze game template...

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.