The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Moxy on May 20, 2010, 04:03:01 AM

Title: [RESOLVED] place enemies in a restricted area
Post by: Moxy on May 20, 2010, 04:03:01 AM
Object: to have non-random enemiy encounters
Restrictions: enemies can only move in a predetermined area (not a map area)
                   enemies will move toward the player and stop at edge of above
                   enemies will resume random movement when player backs away from above
                   movement is orthogonal

A visual example of this is: ball on a string

I have tried writing an event for this with some success. The event breaks down during MOVE
TOWARD PLAYER. Also when trying to make an integer absolute. The event became hopelessy
nested when MOVE EVENT needed nine cases.

NOTE: modern algebra, I am unlearning, will soon be learning.
Title: Re: place enemies in a restricted area
Post by: dricc on May 20, 2010, 09:37:52 AM
I think that one of my scripts can help :

http://rmrk.net/index.php/topic,34614.0.html

But ... orthogonal ????
Title: Re: [RESOLVED] place enemies in a restricted area
Post by: Moxy on May 20, 2010, 02:06:37 PM
Thanks dricc, that will be useful to me.
Title: Re: [RESOLVED] place enemies in a restricted area
Post by: Moxy on May 21, 2010, 08:26:32 PM
OK, after further review, I was able to make an event that fullfilled the stated
objectives. It took 3 pages. First page, enemy random movement in restricted
area. Page 2, move toward player when player enters the restriced (doesn't
have to be the same) area. Page 3, collision detection and battle. So basically,
enemy wanders around, you get close enough, enemy runs toward you, you
defeat the enemy (or evade!), enemy flashes and resets. Newb time for creating
event - 5 HRS with sleeping on it! A nice learning exercise.

If anyone can tell me how to post event page screen shots, AND anybody cares
then I will do so. Orthogonal means non-diagonal movement (left right up down)
Title: Re: [RESOLVED] place enemies in a restricted area
Post by: apoclaydon on May 27, 2010, 06:19:35 AM
there is an area option on maps just right click the map name and select new area this allows to set monsters for that area