Hey. Im working on an adventure game in which the allies follow the main platyer around. The problem is well, he stays on one side of the hero. Its kind of like this:
ally (ball movement): always follow hero relative to 0,16 of the hero
Or something like that. Ive seen an example or two on how to do this but i was wondereing if you had any suggestions. Plus, for my enemy ai, i have one that, (after wondering around for a while) if the player gets within a certain radius of the enemy, then he goes for the hero and follows him for a while. Say, the hero moves down, the enemy will be above him chasing. Or if the hero moves left, the enemy will chase him on the heros right side. And the enemy goes smoothly, not staying in one spot. I was wondering how i could write something like that for an ally or two.
All platforming problems can be mostly solved here:
ad some flags or alt value´s to the group folowing the player in the playfield
so that if the, lets say
object-1 has flag 1 set (ON) it folows's a specific x/y position of the player.
u can set the flags ON or OF for each object from range 1 to ......... many
same thing u can do with alt value's.
normaly in this line there would be something....... hope this helps
well, at least i wasn't flamed this time. i think i solved it by giving my following character player 2 status. Since that puts him in the center of the screen and gives the illusion of a following ally. it works anyway, thanks for the views and the posts.
All platforming problems can be mostly solved here: