I am trying to build an AI that only moves when the movement is off of the drawn part of another Movie Clip. Lets call the AI’s body “gob_mc” (goblin) and the walls for where it cannot walk “gobWall_mc”. At the moment I’m not workin on the goblins appearence so I’m using a 50x50 yellow square with no rotation etc.
Anyway I came up with this “ish.”
Create a random number for each x and y.
If those x and y coordinates are not hitting wall_mc then go ahead and dynamic tween that way.
If those x and y coords are hitting a wall then recalculate them and repeat check for dynamic tween.
And there lies my problem. This recalculation is lagging my system (30 fps). Does anyone know a simpler way to do this… or do I need to clarify anything. I’m sure I’m missing something thats fairly simple as most things go.
Thanks for any help.