toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
How can I make an actor "chase" another actor?
NederBros
Member
Posts:
13
June 2010
edited November -1
in
Working with GS (Mac)
I'm making a game with enemy actors that would chase the player. How can I make them follow the actor around the scene?
Comments
AfterBurnett
Member
Posts:
3,474
June 2010
Click on "support" at the top of the page. Seek and you shall find
ORBZ
Member
Posts:
1,304
June 2010
Move behavior
hrsmedia
Member
Posts:
522
July 2010
I am trying this method from the wiki:
Chasing the actor (version 2)
Timer: Every .01 sec
Change Attribute: self.PositionX = self.PositionX + (game.TargetX-self.Position.X)/4
Change Attribute: self.PositionY = self.PositionY + (game.TargetY-self.Position.Y)/4
The actor follows ok, but it is VERY jittery/jerky. Anyone tried this?
gyroscope
I am here.
Member, Sous Chef, PRO
Posts:
6,598
July 2010
I haven't tried it nor the following, but it might work possibly: maybe try Constrain Attribute instead of Change and the Timer?
Forte
Member, PRO
Posts:
297
July 2010
@POLYGAMe
"Click on "support" at the top of the page. Seek and you shall find
"
Copyright infringement POLYGAMe!
Im pretty sure that motto is copyright be Seek.com!
lol jokes.
Sign In
or
Register
to comment.
Comments
Chasing the actor (version 2)
Timer: Every .01 sec
Change Attribute: self.PositionX = self.PositionX + (game.TargetX-self.Position.X)/4
Change Attribute: self.PositionY = self.PositionY + (game.TargetY-self.Position.Y)/4
The actor follows ok, but it is VERY jittery/jerky. Anyone tried this?
Copyright infringement POLYGAMe!
Im pretty sure that motto is copyright be Seek.com!
lol jokes.