Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> *Help* Make an objects chase player
rewells
post May 28 2012, 07:01 PM
Post #1


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




I'm working on some puzzles and can't figure out how to make something work. I'm trying to create a room like the one found starting at 6:32 in this video: http://www.youtube.com/watch?v=RHClvvrhmxw...;feature=relmfu

There are three large balls. When the player gets within a certain distance, the balls start rolling in the direction of the player, and if you get hit you take damage. I want it set up so that when the ball collides with the player he is transfered back to the entrance of the map.

What I have tried but doesn't work: I made ball events set to approach player and activate on player touch that transfers to player to the start of the map. The events still move kind of erratically (as in they approach but randomly move left and right for some reason) and if they touch the player while the player is NOT moving, nothing happens (it works fine if the player is moving and collides with the event).

Can anyone help me?


__________________________
Go to the top of the page
 
+Quote Post
   
Night_Runner
post May 29 2012, 04:12 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,529
Type: Scripter
RM Skill: Undisclosed




Have a demo
http://min.us/mQvqGzqGA

I think you mostly have it working, just have the events trigger off an "Event Touch".

The random movement left/right is a feature of the "Approach" Movement type, it's in case there's a tree or something in their way, they just move to the side every so often so they don't get stuck.
There's obviously better ways to address this potential issue (path generation for example, or only moving randomly if there's something actually blocking the way), but the dumb 'move randomly 1/6 of the time' is very simple to implement, and uses almost no processing power, so I'm guessing that's why Enterbrain implemented it happy.gif


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
rewells
post May 30 2012, 08:14 PM
Post #3


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




Thank you! This is awesome. I'll credit you if I make a longer project!

QUOTE (Night_Runner @ May 29 2012, 08:12 AM) *
Have a demo
http://min.us/mQvqGzqGA

I think you mostly have it working, just have the events trigger off an "Event Touch".

The random movement left/right is a feature of the "Approach" Movement type, it's in case there's a tree or something in their way, they just move to the side every so often so they don't get stuck.
There's obviously better ways to address this potential issue (path generation for example, or only moving randomly if there's something actually blocking the way), but the dumb 'move randomly 1/6 of the time' is very simple to implement, and uses almost no processing power, so I'm guessing that's why Enterbrain implemented it happy.gif



__________________________
Go to the top of the page
 
+Quote Post
   
rewells
post Jun 4 2012, 01:12 PM
Post #4


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




Ok I set this up in my project and for some reason the things that chase me work left-to-right but not forward-and-back. I've triple checked my eventing and cannot for the life of me figure out why it's doing that. Any ideas?

Here is my current project. Maps 006 and 007 are the ones I'm having trouble with.


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 12:30 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker