The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: slyneutron on August 04, 2010, 03:34:09 PM

Title: How do you make an enemy walk around and if it touches you starts battle?
Post by: slyneutron on August 04, 2010, 03:34:09 PM
In RPG Maker XP. How do you make an enemy walk around and if it touches you starts battle? or a man walking around and if you press the action button you talk to him.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Zylos on August 04, 2010, 03:38:19 PM
...wow, basic of the basics there.

For the enemy, just set the enemy event's trigger to Event Touch, and then add in the event command Battle Processing. For the NPC... just add in the sprite and some text really. The default trigger is the action button.

Or are you asking how to make an event?
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: moobob9 on August 04, 2010, 03:41:16 PM
What you have to do is edit the event of the man walking around. Change the trigger condition to either "touched by hero" or "collision with hero". I believe that will work.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Zylos on August 04, 2010, 03:43:51 PM
That's what Event Touch is, in RMXP.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: slyneutron on August 04, 2010, 03:46:52 PM
I tried it but the enemy would only stand there and move when the actor touches it and he only faces in another direction because right afterward it jumps straight  into battle.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Zylos on August 04, 2010, 03:49:31 PM
Autonomous Movement. Just change the type and it'll move, this way when it touches the player it'll jump to battle.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: moobob9 on August 04, 2010, 03:49:49 PM
If you want to make the enemy move, you have to make an event on the enemy called "move event" (or at least that's what it's called in 2k3). From there you can control the movement of any sprite.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: slyneutron on August 04, 2010, 03:56:33 PM
Change the type of what? and Where do I find Autonomous Movement? What im trying to do is make the enemy move in a parallel process but if it touches you it jumps into battle. I guess pokemon could be an example. When the people are everywhere and if they see you you have to battle. That way you have a chance to try to avoid them. Something like that, but the enemy has to touch you.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Zylos on August 04, 2010, 04:07:03 PM
No, don't do a parallel process. That automatically runs whatever commands are in the list. Set it to Event Touch. Right above your triggers is the movement options with type, speed, and frequency. Change the type to something like approach.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: slyneutron on August 04, 2010, 04:16:06 PM
ok I did what you said with Autonomous Movement at approach (I have tried all the others types of Autonomous Movemen types as well) and trigger as event touch and battle process in the event commands, but when I test it the enemy just stands there. It wont even start the battle. I tried it with action button as trigger,but it still wont battle.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: moobob9 on August 04, 2010, 04:25:12 PM
Well, I'm stumped.......
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Zylos on August 04, 2010, 04:30:37 PM
Do you have something set up similar to this?

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi254.photobucket.com%2Falbums%2Fhh99%2FZylos_2007%2Fenemy.png&hash=c47b9d26f864af1c9ab2b28be24815b7ebcc5e7f)


Because this works fine for me.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: moobob9 on August 04, 2010, 04:32:44 PM
Hey Zylos how do you put snapshots like that on here? I know how to put it on paint and save it, but how do you upload it to this site?
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: slyneutron on August 04, 2010, 04:34:27 PM
Almost exactly I just have speed at a slower setting and freq was on low
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Zylos on August 04, 2010, 04:36:25 PM
And it's not working for you? Because speed doesn't really matter per se for it working or not.

@Moobob - Offtopic, but you can just use an image host like Imgur or Photobucket.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: slyneutron on August 04, 2010, 04:39:45 PM
oh my. I just realized what was wrong.
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: moobob9 on August 04, 2010, 04:40:30 PM
what?
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: slyneutron on August 04, 2010, 04:45:18 PM
I am so sorry. I just noticed that there was still another event page that I had added that I was tinkering with. Once I deleted it the event worked.
Sorry I just started using RMXP not to long ago. So I am still in the process of learning. I usually use google to just see if any one else had the same problems. Thats how I stumbled on this forum. I do read more tutorials. So im learning. I will check out this forum more often though. Thanks a lot Zylos you have been a great help. Sorry for the mistake again
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Zylos on August 04, 2010, 04:48:36 PM
XD

Well that works. Glad you at least got it working. :3
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Sated on August 04, 2010, 04:54:51 PM
Enemies that just "approach" the hero constantly are boring. Also, if you have a lot of enemies on the map, then the hero will quickly get cornered and be forced to fight a lot of battles in a row. It is a poor design choice.

What you should actually do is try to introduct some AI to the enemies, like this (http://rmrk.net/index.php/topic,39446.html).
Title: Re: How do you make an enemy walk around and if it touches you starts battle?
Post by: Zylos on August 04, 2010, 05:00:00 PM
What we showed him was the bare basic for how to have an enemy touch the player to start a battle. For someone still learning the ropes, it'd probably be better just to keep it simple for now until he's gotten the hang of it.