Main Menu

How do you make an enemy walk around and if it touches you starts battle?

Started by slyneutron, August 04, 2010, 03:34:09 PM

0 Members and 1 Guest are viewing this topic.

slyneutron

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.

Zylos

...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?




moobob9

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.
..........|¯•¸_¸,.•"ˆ¯....Thundercow....¯ˆ"•.,¸_¸•¯|..........
¯•_¹ˆ¯•ˆ¯¯±¸_Thunderclan WÅrrÏØr_¸±¯¯ˆ•¯ˆ²_•¯

Epequest
Game-25% complete
Demo-99% complete

Zylos





slyneutron

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.

Zylos

Autonomous Movement. Just change the type and it'll move, this way when it touches the player it'll jump to battle.




moobob9

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.
..........|¯•¸_¸,.•"ˆ¯....Thundercow....¯ˆ"•.,¸_¸•¯|..........
¯•_¹ˆ¯•ˆ¯¯±¸_Thunderclan WÅrrÏØr_¸±¯¯ˆ•¯ˆ²_•¯

Epequest
Game-25% complete
Demo-99% complete

slyneutron

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.

Zylos

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.




slyneutron

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.

moobob9

..........|¯•¸_¸,.•"ˆ¯....Thundercow....¯ˆ"•.,¸_¸•¯|..........
¯•_¹ˆ¯•ˆ¯¯±¸_Thunderclan WÅrrÏØr_¸±¯¯ˆ•¯ˆ²_•¯

Epequest
Game-25% complete
Demo-99% complete

Zylos

Do you have something set up similar to this?




Because this works fine for me.




moobob9

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?
..........|¯•¸_¸,.•"ˆ¯....Thundercow....¯ˆ"•.,¸_¸•¯|..........
¯•_¹ˆ¯•ˆ¯¯±¸_Thunderclan WÅrrÏØr_¸±¯¯ˆ•¯ˆ²_•¯

Epequest
Game-25% complete
Demo-99% complete

slyneutron

Almost exactly I just have speed at a slower setting and freq was on low

Zylos

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.




slyneutron


moobob9

..........|¯•¸_¸,.•"ˆ¯....Thundercow....¯ˆ"•.,¸_¸•¯|..........
¯•_¹ˆ¯•ˆ¯¯±¸_Thunderclan WÅrrÏØr_¸±¯¯ˆ•¯ˆ²_•¯

Epequest
Game-25% complete
Demo-99% complete

slyneutron

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

Zylos





Sated

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.

Zylos

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.