The Daily Click ::. Forums ::. Klik Coding Help ::. Following allies
 

Post Reply  Post Oekaki 
 

Posted By Message

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
10th May, 2007 at 13:58:20 -

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:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

savvy001



Registered
  27/03/2007
Points
  295
10th May, 2007 at 17:21:12 -

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



 
Living in space

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
14th May, 2007 at 15:02:05 -

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:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko
   

Post Reply



 



Advertisement

Worth A Click