how to stop actor moving when collide with another actor?

cptongsgcptongsg Member Posts: 70
edited November -1 in Working with GS (Mac)
Hi, I have set a actor to chase a actor. but when the chasing actor collide with the target actor, the chasing actor keep on pushing the target actor to it direction. How to I mend this issue? How do I set it stop to the distance i prefer? Thks in advance.

Comments

  • synthesissynthesis Member Posts: 1,693
    Wasn't this just asked like 2 days ago...
    Can anyone find that old thread for this one? I've looked...no luck yet.
  • synthesissynthesis Member Posts: 1,693
    Anywya...
    The logic sequence would be...
    When the actors collide...chasing actor should stop chasing and target a new point a set distance away from the previous target.

    This would require several rules and switches to execute and about 1-3 hours for me to set it up for you (which most of us don't have time to do...have our own games to work on). It is fairly simple sequence...but would require some time and careful execution.

    if its too challenging for you right now...keep reading and learning the basics...you'll get it soon. Also...there may be lots of example on the web for you to explore...just need to dig around the GS web or the forum boards for a while.

    Keep working on it though...GS is easy to learn...just takes a week or 2 to get all the details figured out. From there...its just takes lots of practice to get good at it.
  • cptongsgcptongsg Member Posts: 70
    I have search all the tutorial & forum for related execution all day, but no luck. It all pretty basic tutorial. As I do not have any base on programming that a challenge for me. Thks Synthesis, Will try to fig out with your suggestion.
  • synthesissynthesis Member Posts: 1,693
    If you are new to programming...just be patient. Practice makes perfect and it never works right at first...and usually not even after several tries. Programming is a process...with lots of trial and error. You will fail hundreds of times before succeeding...we all have.

    My tip is:
    THINK LOGICALLY AND SEQUENTIALLY.
    see these posts:
    http://gamesalad.com/forums/topic.php?id=4117
    http://gamesalad.com/forums/topic.php?id=4114
  • cptongsgcptongsg Member Posts: 70
    word of wisdom, thks a lot! :)
  • ValanValan Member, BASIC Posts: 410
    I had the opposite problem.

    When the user craft collides into still actors I want them to follow the craft.

    To do this, I used two identical actors one still and spawns the second when it is hit by the craft.

    So you could have one actor chasing and once it collides it spawns another that behaves differently.
  • ValanValan Member, BASIC Posts: 410
    oh, you can also set the density in the Physics settings of each actor.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Or you can set a Rule that says when overlaps or collide change self.linearvelocityX to 0.

    That should stop your actor
  • cptongsgcptongsg Member Posts: 70
    Thks alot I will try it. :)
  • cptongsgcptongsg Member Posts: 70
    I try the spawns logic it work fine, however setting the density & velocity can't stop the chasing actor. It seen very logic to set that but..... I have no clue which part I have done wrong. Learn something new today Thks Guys!!!
Sign In or Register to comment.