How to make an actor move on a path?

DreamStudiosDreamStudios Removed Posts: 148
edited November -1 in Working with GS (Mac)
Ok I don't know how to make an actor follow a path. It's an enemy actor.

How do I make it go up then right, down, left then up again?

Comments

  • master200012master200012 Member Posts: 372
    You can try to create a new actor that actors like a button.
    If your enemy actor hits this button, you can do the following:

    1. Have four of these actors (one to move the actor right, one left, one up, one down).

    2. Make an attribute. Each direction has a number, which changes upon contact.
    (ex. Actor must turn right. It hits the button and attribute changes to 1. Since 1 is assigned as making the actor move right, it turns right.)

    3. Put multiple types of this actor on the course and modify them in the scene, not the prototype.

    I listed them in order of easiness. ;)
  • Alien8Alien8 Member Posts: 37
    Or...You could put an integer attribute in your enemy actor, say "MotionCount".

    1. Make a Rule: if MotionCount > 4, MotionCount=1.
    2. Make a Rule: Every 1 sec, MotionCount = MotionCount+1
    3. Make a Rule: When MotionCount=1, Move up at 100
    4. Make a Rule: When MotionCount=2, Move right at 100
    5. Make a Rule: When MotionCount=3, Move down at 100
    6. Make a Rule: When MotionCount=4, Move left at 100
  • DreamStudiosDreamStudios Removed Posts: 148
    thanks for replying :D
  • DreamStudiosDreamStudios Removed Posts: 148
    but didn't work :(
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, I couldn't get it to work with Move or Move To either; try this, based on position of 138,262 (changing x and y values/times to what you want, of course):

    Integer att. called NextMove

    Rule:
    When scene.Nextmove = 0
    Interpolate self.Position.x To 238 Duration 1 second
    Timer: After 1 second
    Change attribute scene.NextMove to 1

    Rule:
    When scene.Nextmove = 1
    Interpolate self.Position.y To 162 Duration 1 second
    Timer: After 1 second
    Change attribute scene.NextMove to 2

    Rule:
    When scene.Nextmove = 2
    Interpolate self.Position.x To 138 Duration 1 second
    Timer: After 1 second
    Change attribute scene.NextMove to 3

    Rule:
    When scene.Nextmove = 3
    Interpolate self.Position.y To 262 Duration 1 second
    Timer: After 1 second
    Change attribute scene.NextMove to 0

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • DreamStudiosDreamStudios Removed Posts: 148
    Why is this so hard for me aargh.

    Can I send you my project please gyroscope to have a look at?
  • DreamStudiosDreamStudios Removed Posts: 148
    I did what you said but the actor only goes in a straight line then stops.
Sign In or Register to comment.