Player collision on a Parallel Event

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
I have an event that lasts for 6 seconds, running via parallel

However I also want it to run an action if that event touches the player ... would this be possible?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
you cannot have two triggers for an event - but usually you don't need that, and there are several ways around that limitation.

Give us a screenshot of the event you have so far and tell us what you want it to do, and we'll show you how to do that.
 

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
Here you go .... thankyou in advance

Basically what I'm trying to achieve is a zombie to pop up at spawn point, then walk towards the player. If the zombie touches the player within X frames / seconds it triggers a battle, if it doesn't touch the player within X frames / seconds it deletes itself.

Screen Shot 2015-12-12 at 15.07.25.png

Screen Shot 2015-12-12 at 15.07.59.png
 
Last edited by a moderator:

Zanazaru

Veteran
Veteran
Joined
Aug 17, 2015
Messages
85
Reaction score
6
First Language
German
Put the parallel event parts in a different event and make it spawn the zombie event, which you set to on event touch starting the battle.
 

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
Put the parallel event parts in a different event and make it spawn the zombie event, which you set to on event touch starting the battle.
I understand this, but the map is pretty big and i'm hoping to use this event at many locations so it seems as though the enemy is stalking the player. So having one 'main event' would mean that the enemy would spawn at every location which wouldn't look so good.
 

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
I think i've almost got this figured out now ... it's a bit tricky, but it does what I need it to do. So i'm posting it here for others to use if they need it.

OK, so there is a main variable in the game called killer countdown, this is set to zero in the main game loop (as per this screenshot)

Screen Shot 2015-12-12 at 21.50.26.png

 

On the map there is an event called a spawn point that when walked over sets a random number between 0 and 10, if the number is a 10 it turns on its self switch A and then sets the killer countdown to a random amount. It also moves itself to the location where the zombie pops up from.

 

Screen Shot 2015-12-12 at 21.51.46.png 

On the spawn points second page, it looks like this ...

Screen Shot 2015-12-12 at 21.54.21.png

Obviously the event doesn't reset itself (if someone could suggest a method for this it would be great). But for now, it works and my brain can rest a little easier :)

So basically what happens is that if the player walks over the spawn point, it creates a random number. If that random number is a 10 then it triggers the spawn of the zombie, the spawn point moves itself to where the zombie will appear, and sets the killer countdown to a random number between 1 and 10. 

The main game loop then picks this up and begins subtracting 1 from the killer countdown every second (or so) until it reaches zero.

Once the killer countdown reaches zero it no longer satisfies the second page of the spawn event and as such "turns off".

Screen Shot 2015-12-12 at 21.50.26.png

Screen Shot 2015-12-12 at 21.51.46.png

Screen Shot 2015-12-12 at 21.54.21.png
 
Last edited by a moderator:

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
After some serious testing the problem with this method is that if you add more than one of them to the map, it does spawn multiple enemies which kind of defeats the point ... could anyone suggest a way to get the event to delete itself once the killer has been alive for the duration of the killer countdown?
 

Zanazaru

Veteran
Veteran
Joined
Aug 17, 2015
Messages
85
Reaction score
6
First Language
German
You need a different switch for every event or you could use one variables and tie certain values to certain zombies ^^

use another event to reset the zombies^^
 

Lestroth

Veteran
Veteran
Joined
Apr 7, 2013
Messages
121
Reaction score
71
First Language
German
Hello!

I'm not sure if I unsterand you correctly, because there seems to be an issue with the general idea of how your event should work. As far as I could see from your different threads you want to achieve something like this:

A zombie sporadically shall emerge near the player. On touching the player something should happen, but if the player manages to avoid the zombie it should simply vanish.

There are different ways to construct such a scenario. You could work with two seperate events.

Event001 becomes a zombie if a specifiic switch is active (I'd name it the zombie switch). The first page is blank. The second page of this event (activated with the zombie switch) has a custom move route (move towards player) with an event touch trigger to execute instant death/a battle/whatever. You can have this event "spawn" whereever you want, preferably at least one tile away from the player to not instantly trigger whatever page two contains.

Event002 is the timer event. You could set page one of this event to activate the zombie switch (and further set the "spawn" location for Event001) by Event Touch. On page two (which is also activated by the zombie switch!) you then set the Trigger to Parallel Process and give this event a Custom Move Route with a Wait... of x frames (360 for 6 seconds) and a Switch OFF... of your zombie switch. If you want this event to just happen once and not be triggered by the player walking over the timer event again, you also have to use a self switch for this event via Script Call

$gameSelfSwitches.setValue([$gameMap.mapId(), $gameMap.event(), 'A-D'], true);Another similiar way would be to make the timer event into a common event.

To answer your initial question: Yes, it is possible to have an "Event Touch" in a parallel process... kinda. You need a conditional branch to check the x and y coordinates of both the player and the event. But in your case the problem (in my eyes) lies within the use of the Wait Command. If you use a Wait in the "Contents" field it would delay the execution of the conditional branch.

I apologize in advance if I got your problem wrong and this doesn't help you (but I hope it does!)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top