Platformer Ai

RaidenMX_BuisnessRaidenMX_Buisness Member Posts: 9
edited October 2012 in Working with GS (Mac)
Hi I'm a fellow game designer I guess you can say and I was wondering how to use the distance of an enemy to see at a certain distance and go after him I have tried Tshirtbooths video and it didn't work so I used the forums before and no one really responded so here is what I'm using now
Constrain Attribute
Game.player x to self.position.x
Constrain Attribute 'distancefrom'
to
game.player x-self.position.x
Attribute 'distance between' is greater than -264
and Attribute 'distance between' is less than 264,
then
change attribute insight=true
if attribute insight=true
move to
attribute game.player x

Comments

  • GLGAMESGLGAMES SingaporeMember Posts: 988
    A easier solution maybe using an invisible barrier around your enemy actors. so once your main actor collides with that barrier your enemy starts reacting. Of course that might not be very flexible given the invisible barrier is all around the enemy , if you wish only to make it react at different positions.
Sign In or Register to comment.