Chaos Project

RPG Maker => Event Systems => Event System Database => Topic started by: Blizzard on August 08, 2008, 10:28:00 am

Title: Push to Move
Post by: Blizzard on August 08, 2008, 10:28:00 am
Push to Move
Version: 1.0
Type: Event Behavior



Introduction

This is a fairly simple system, but some people might bother with more complicated ways to achieve this while it's actually so easy to make.


Features




Screenshots

N/A


Demo

N/A


Instructions

Put this event code in any event.

Event code: ShowHide
@>Play SE: '045-Push01', 80, 100
@>Set Move Route: Player
                : $>Change Speed: 3
@>Set Move Route: Player
                : $>1 Step forward
@>Set Move Route: This event
                : $>Turn away from Player
                : $>1 Step forward
@>Wait: 8 frames
@>Set Move Route: Player
                : $>Change Speed: 4


A possible improvement is to prevent moving at all if the event can't move. In this case you need a scripted Conditional branch wrapping the event code above. This is the altered event code:

Event code: ShowHide
@>Conditional Branch: Script: $game_map.events[@event_id].passable?($game_map.events[@event_id].x, $game_map.events[@event_id].y, $game_player.direction)
  @>Play SE: '045-Push01', 80, 100
  @>Set Move Route: Player
                  : $>Change Speed: 3
  @>Set Move Route: Player
                  : $>1 Step forward
  @>Set Move Route: This event
                  : $>Turn away from Player
                  : $>1 Step forward
  @>Wait: 8 frames
  @>Set Move Route: Player
                  : $>Change Speed: 4
: Branch End


If you don't use a speed change, be sure to set the "Wait" command appropriately to 1, 2, 4, 8, 16 or 32 for the player speeds 6, 5, 4, 3, 2 and 1 respectively. (i.e. the speed was changed to 3, to a time of 8 frames is required)


Credits and Thanks




Author's Notes

You can use this code in a common event and simply call that common event from an actual event.

N-Joy! =D
Title: Re: Push to Move
Post by: Fantasist on August 08, 2008, 11:40:17 am
It's simple and does the trick. Now, I've got to check other event systems to see what you mean (really, I've NEVER checked a push-event system before >.<)
Title: Re: Push to Move
Post by: Reno-s--Joker on January 24, 2009, 11:43:34 pm
:D Wow, awesome - I love it. Thanks so much for this!
Title: Re: Push to Move
Post by: Punn on January 25, 2009, 04:58:02 am
There's a script that does this too.
I remember I did this before but it was long and no script piece was involved.
Title: Re: Push to Move
Post by: Holyrapid on June 30, 2009, 06:33:16 am
I AM TRULY SORRY FOR THIS KIND OF A NECRO POST THING! But there´s one thing i don´t get, and that is why do you need to use a script snipplet to check if you can move the event? Wouldn´t it be simpler and simpler to check the ingore if can´t move box in the set move route?
That way it could be used unmodified in 2k/3...
Title: Re: Push to Move
Post by: Blizzard on June 30, 2009, 07:51:43 am
I remember having some problems with that, that's why.
Title: Re: Push to Move
Post by: Holyrapid on June 30, 2009, 09:02:05 am
Ok. Sorry to bring this up...
Title: Re: Push to Move
Post by: Calintz on June 30, 2009, 04:02:32 pm
Oh, I hadn't noticed that this was even here, Lol.
Good job instructing though.
Title: Re: Push to Move
Post by: Ryex on June 30, 2009, 11:29:48 pm
Quote from: Calintz on June 30, 2009, 04:02:32 pm
Oh, I hadn't noticed that this was even here, Lol.
Good job instructing though.

what do you mean! have you never looked at the database guide I posted? I updated it by the way, but then again you know that.
lol to think that this was one of the very first things i learned to do with events, i did it the exact same way to