Author Topic: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)  (Read 5931 times)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
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

  • Compatible with XP, VX, and VX Ace
  • Useful for ANY Event Type - Action Button, Player Touch, Event Touch, and even Autorun and Parallel!
  • Uses Custom Move Route Scripts to do ANYTHING!

Screenshots

Simple Event Sensor (Little Drago's Script)

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

    Little Drago for use of his Simple Event Sensor Script

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
« Last Edit: September 25, 2013, 10:33:59 AM by Heretic86 »
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3038
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: Autorun for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #1 on: September 23, 2013, 05:45:45 PM »
Quote
Have 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?



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: Autorun for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #2 on: September 23, 2013, 06:52:15 PM »
Quote
Have 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

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
Re: Autorun for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #3 on: September 24, 2013, 03:05:01 PM »
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.
« Last Edit: September 24, 2013, 03:06:49 PM by Heretic86 »
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #4 on: September 24, 2013, 03:41:24 PM »
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?

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #5 on: September 25, 2013, 03:10:04 AM »
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.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #6 on: September 25, 2013, 09: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.

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #7 on: September 26, 2013, 10: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...
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #8 on: November 16, 2013, 05:30:50 AM »
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!

Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #9 on: November 17, 2013, 04:44:39 AM »
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?

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #10 on: November 17, 2013, 05:25:50 AM »
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.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #11 on: November 17, 2013, 05:50:41 AM »
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

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #12 on: November 17, 2013, 08: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...

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 740
  • LV: 29
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #13 on: November 18, 2013, 01:35:34 AM »
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.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: Parallel Events for ALL Event Types! (Action Button, Event Touch, Etc)
« Reply #14 on: November 18, 2013, 03:53:23 AM »
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.