The Daily Click ::. Forums ::. Klik Coding Help ::. Monsters movement How to follow the hero?
 

Post Reply  Post Oekaki 
 

Posted By Message

]Alpha[



Registered
  19/09/2003
Points
  245
29th July, 2006 at 06:11:34 -

Hello.
First time for me on this forum, so first of all I should introduce myself

My name is Danilo and I'm 23.
I'm a great RPG fan, so I'm working on a little project on MMF1 : A role play game turn based.

While the combat system is almost finished and the story has been arleady write, my only problem is that I still have to choose how the fight should begin.
I don't really like the idea of random encounters (like in most RPG) and I would prefer something like Super Mario RPG (The monster see you, then he chase you until he got you).

So my problem is : "How do I make the monsters move always in the direction of the hero?"
"How can I change their movement depending on the direction of the hero?"


Sorry if this is a noob question, but I thinked a lot about it and I really don't know how I can solve this problem by myself.
Any help would be appreciated.


Thank you!

 
All that I see is the years...

Penguin Seph



Registered
  11/12/2002
Points
  1338
29th July, 2006 at 06:27:28 -

If you are using MMF, all you have to do is "Always-Look in the direction of Player" by right-clicking on New Condiction and finding Allways, then setting the event under the enemy to "Look in the direction of player"

Hope that helps you!

 
Hi!

Jakob37



Registered
  07/08/2005
Points
  541
29th July, 2006 at 06:28:39 -

Always: (enermy) Look at 0,0 from "hero"

That is the most basic way to make the enermy to move in the direction of the hero.

Edit: I didn`t see his post when I posted.

Image Edited by the Author.

 
n/a

hishnak



Registered
  18/04/2004
Points
  994
29th July, 2006 at 09:11:48 -

Hmmm...I think its going to be more complicated than that guys. You can't just have the enemies running through trees and stuff. They will have to navigate around obsticals to get to you...but I'm no coder so I'll just shut my mouth.

 
I'm feeling a bit wella

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
29th July, 2006 at 12:10:03 -

Here's a a bit of a "Cheap" way of doing, it'll be very easy to get the enemies stuck behind obstacles, but slightly less so than the above ways.

-------------------
Every .15" & Number of Enemy attractors < 1
Player Shoot (Enemy Attractor) at Speed 0

Always
Add 1 ValueA.Enemy Attractor

ValueA.Enemy Attractor >=15
Destroy Enemy Attractor

Then just code you enemies to always look in the direction of the Enemy Attractor.


====================
It's not great, but given your relative in-experience with klik products, this is probably your best bet for now.

 
Craps, I'm an old man!

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
29th July, 2006 at 14:11:20 -

You may want to read Dines' article on enemy AI to give you some ideas:
http://www.create-games.com/article.asp?id=1620

 
My signature is never too big!!!

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
29th July, 2006 at 15:02:36 -

You could use the path finder object, but I could never get it to work without crashing or just simply not working. If you can get it to work though, then far be it from me to say it's not useful. Might be something to look into. Could solve a lot of problems, including smacking into objects in its way.

 
http://www.facebook.com/truediamondgame

]Alpha[



Registered
  19/09/2003
Points
  245
31st July, 2006 at 04:53:36 -

First of all : Thanks to all of you for your answers.

Penguin and Jakob, maybe it is my fault because I didn't explain well the situation, but I was looking for a little more good way to create an AI for enemies than simply use the "look in the direction of player" option.
Anyway, your help has been really appreciated!

MightyJoe, that guide seems very good!
I will check it as soon as possible and I will tell you if it is useful for me

Thanks again guys!
I'll keep you informed

 
All that I see is the years...
   

Post Reply



 



Advertisement

Worth A Click