Chaos Project

RPG Maker => Event Systems => Topic started by: Heretic86 on September 22, 2013, 10:58:26 pm

Title: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Heretic86 on September 22, 2013, 10:58:26 pm
Parallel Events for ALL Event Types!
Version: 1.0
Type: Clever Eventing



Introduction

Have you ever run into a situation where you wanted your Event to both be a Parallel and an Event Touch?  This is how you can do it!


Features




Screenshots

Simple Event Sensor (Little Drago's Script)
(http://i.imgur.com/6wfGJ.gif)
Its basically this, but with the ability to do ANYTHING instead of just Jumping, like an Animation then chase the Player!  Whee!



Demo
http://www.775.net/~heretic/downloads/rmxp/ParallelForALLEvents.exe



Instructions

This trick is easiest when you have an Event isnt using a Custom Move Route, but is possible.  It is useful for things like Enemies where you want them to have a Move Type of Approach, but want them to play an Animation when they go into their "Attack" mode.  This is good for a One Shot Trigger, which is why I originally called it an Autorun.  Autorun waits for other Autoruns to complete.  This does not.  It executes as soon as the New Event Page is loaded.

This is actually a deceptively easy yet clever trick using Custom Move Routes to execute your Parallel Commands, then simply changing your Move Type from Custom Move Route to Approach.  This way you can accomplish BOTH!

You'll probably need some knowledge of Scripting.  Set up your Event to an Event Touch, and although we want it to be an Approach Type for example, we will use Custom Move Route.  Set Frequency to HIGHEST.  Use Autonomous Movement Custom Move Route, and NOT the one where you enter Event Commands.  It is the BUTTON that says MOVE ROUTE just next to the Events Graphic.  In that window, Uncheck the Default of Repeat Action.  If Repeat Action is NOT checked when you originally click on it, then you are in the WRONG WINDOW.  Do what ever you need to do using Scripts.  For your last two scripts, run these scripts: @move_type = 2 to set the Event to Approach (0 is Fixed and doesnt move, 1 is Random, 2 is Approach, 3 is Custom)  If you want to change the Move Frequency off of Highest (which is 6 by the way) use @move_frequency = 1-6 to set the Move Frequency from there.  Then the Event will behave the way you want it to behave!

If you want to be really advanced, you can set up a Custom Move Route and store it somewhere else.  When you run your Move Commands, do the same thing, but this time, you can use @move_route = stored_move_route.  It may require some knowledge of Scripting to create and store that Move Route somewhere else, then retreive it as needed, but its very useful for getting both an Autorun Type of event to behave just like you want it to.

It doesnt require ANY Scripts to pull this off, but a good knowledge of Scripting is useful.  Just thought I'd share.



Credits and Thanks




Author's Notes

There are numerous scripts out there that will change Game Switches, Game Variables and Self Switches for you without requiring an Event to do so.  Really, there are just too many to list.  I am working on a Script right now that also changes Switches without touching an Event.  When there is no Event that causes a Event to Change Pages, the ability to make an Event do something specific, like Play an Animation difficult to do without some tricky, easy, and clever Eventing.  This is one way to pull off that Clever Eventing.  Another would be to set the event to Autorun and execute commands from there.  Changing that event from an Autorun to a Approach event is also possible, but a bit more difficult.  It WOULD require very simple scripts to open up :move_type, thus, it has not been explained in this demo because that is Scripting, not Eventing.

Im borrowing Little Drago's Simple Event Sensor because it can perfectly display exactly when this type of Eventing System becomes extremely useful.  I'll link to it just in case you are interested.

Little Drago's Simple Event Sensor Script - [XP][VX][VXA]
http://forum.chaos-project.com/index.php/topic,8581.0.html
Title: Re: Autorun for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: KK20 on September 23, 2013, 11:45:45 am
QuoteHave you ever run into a situation where you wanted your Event to both be an Autorun and an Event Touch?

No...?

An auto-run event prevents the player from making any inputs to the character. An event touch is when the player and event collide (either one can initiate the collision). Combining the two means you would just have the player standing there and, eventually, wait for the event to collide with him/her.

Are you sure you didn't mean parallel process? Or is there something I'm not getting here?
Title: Re: Autorun for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Zexion on September 23, 2013, 12:52:15 pm
Quote from: KK20 on September 23, 2013, 11:45:45 am
QuoteHave you ever run into a situation where you wanted your Event to both be an Autorun and an Event Touch?

No...?
Are you sure you didn't mean parallel process? Or is there something I'm not getting here?

I was thinking the same thing. I know there was times I needed both event + player touch maybe even parallel proc, but honestly in all these years of eventing, I've never used autorun o.o
Title: Re: Autorun for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Heretic86 on September 24, 2013, 09:05:01 am
Youre right.  I meant Parallel.  Still need to clean up the first post and format it.  Damn headache will not go away.  :(

The point was intedned toward Pages.  When an Events Pages change, sometimes you want that Event to do more than just wait for the Player to trigger it.  Like alert other enemies, or something like that.
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Zexion on September 24, 2013, 09:41:24 am
Yeah, I ran into this a few times while I was trying to make events follow the player and initiate a battle. Is that what you are using this for too?
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Heretic86 on September 24, 2013, 09:10:04 pm
Pretty much, amongst other things.

Im working with something like Little Drago's Simple Event Sensor, and basically what I wanted was to NOT have to pathfind to the player so just use Approach, and do it in a Metal Gear style where the Enemy puts up the exclamation point over their head when the Page changes to let the player know they are "alerted" to your presence, then Approach the Player.  It doesnt need his script, but it is probably most useful with it where there is no one event that can be used to set up the Animations for that event other than the Triggered Event itself.

Pulling off an Exclamation Point when "alerted" is extremely easy
@animation_id = 98      # Puts Exclamation Point over head [XP] , 97 is the Question Mark
@move_frequency = 6  # Just in case someone else sets it to be different and needs it to change.
@move_type = 2         # Attack!

It just seemed to me that this could be extremely useful to everyone for literally anything.
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Zexion on September 25, 2013, 03:08:34 pm
Is this something like what you want?
http://www.youtube.com/watch?v=g-qg63_BVUI
The only thing is that they don't return to their original spot, but I don't think that's really a big deal as most rpgs with this type of system do the same. Also I know it looks like the enemy isn't even touching me but that's because:
1 - FPS on the video cuts out some frames
2 - I have 8 - way movement, but that charset is only four ways. If it moves diagonally you can't see and it looks like he didn't touch me :P

It isn't spawned by default, and spawns within the range, then randomly walks around, and if the player is in view range it follows for a set time, and then returns to normal. It uses Little Drago's script though.
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Heretic86 on September 26, 2013, 04:40:50 am
The video seems very similar as to what can be achieved between any script that changes self switches and giving them some further control, not limited only to Animations...
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Heretic86 on November 15, 2013, 10:30:50 pm
Quick bumpity.

Another "trick" you can use for an "Autorun Once" it to take any Event Type except Autorun or Parallel and put "start" into an Autonmous Movement - Move Route -> Script, and set it to Not Repeat (which is on by default if you are in the correct Move Route window).  It basically makes any event Self Triggering, so it will do the same thing if the Player triggers the events commands, or when that Events page is changed to the Self Triggering page.

@>Script: start

That's all you need to make an event Autorun without actually being an Autorun!

(http://www.775.net/~heretic/downloads/rmxp/images/AutorunOnce.jpg)
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Zexion on November 16, 2013, 09:44:39 pm
Why is the name of this "Parallel Events"? I know you had started it as Autorun. Have you changed it to parallel process instead, or is it still autorun?
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Heretic86 on November 16, 2013, 10:25:50 pm
Yeah, I changed it to Parallel because of the difference between Autorun and Parallel.

Autoruns wait for other events to finish their list of event commands, while Parallels just run right away.  Since using Move Routes doesnt wait for any other events to finish their list, it could be considered Parallel.  Either way, they both work similarly so whether its called Autorun or Parallel I dont think makes much difference.  Its just picking nits since both ways Auto Execute, and labels are just a form of Semantics.

Point of the whole thread is there are lots and lots of different ways to make events behave like Autorun and Parallel Events without actually being an Autorun or a Parallel.  In our more complex designs, many of us have run into situations where we needed multiple types of triggers, such as Touch and Autorun / Parallel, and the thread just lists a couple of ways to do it, but most certainly not all of them.
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Zexion on November 16, 2013, 10:50:41 pm
I just don't understand what autorun is even for. Honestly I've never used it even in more complex systems. It seems like a really buggy version of parallel proc
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: G_G on November 17, 2013, 01:14:57 am
An autorun event is an event that when executed, no other events will process, other than parallel of course. Autorun events are good for initiating variables and switches and calling script calls for things before your game actually starts, or setting fogs, parallaxes, etc...
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: Heretic86 on November 17, 2013, 06:35:34 pm
Depending on Scripts installed, I actually like using Autoruns for Map Names, and sometimes Cutscenes.  So they have their place.  But yeah, Parallels are much better for setting up Panoramas because they run immediately.  For example, loading a save game where you need an Event to set a Panorama.  Autorun causes the Panorama to change when the Player can see it, but Parallel does not.  In that regard, Parallels are much more useful than Autoruns in that regard, and I also tend to use Parallels over Autoruns for the most part. 

Either way, the ability to make Events work exactly the way you want was the focus of the topic.  I think it is especially useful for those who are new to Eventing, while for the rest of us, probably not so much.
Title: Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
Post by: ThallionDarkshine on November 17, 2013, 08:53:23 pm
Yeah, I always run into problems with the limitations of RMXP's event interface. They never have the features i need to make a certain event work. I'm actually working on creating a new script to add new conditions, triggers and move types to events. The problem i was dealing with was having birds that flew around during the day and flew back to their nests at sunset. It was actually a neat eventing challenge to solve, though I used scripts to implement most of it.