kuddles

Villager
Member
Joined
Oct 2, 2020
Messages
8
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hi team.

I have coded a simple spikes trap that seems to work ONLY with one spike trap. I've copied and pasted the additional spike traps from the working one but they do not seem to raise when I step on the specified region, only this one rises. The damage and screen flash happen to work when i step on the regions, but the spike animations for the other copied/pasted spikes do not. Anyone have a good explanation for this or a fix?Screen Shot 2023-10-01 at 12.59.01 PM.pngScreen Shot 2023-10-01 at 1.05.57 PM.png
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
8,243
Reaction score
3,515
First Language
Dutch
Primarily Uses
RMMV
so far, 2 issues, there is no wait frames between, but if you want them to
work correctly, use 2 pages, 1 up, and goes down, SelfSwitch A ON.

page 2 in vice versa direction, SelfSwitch A OFF and it should work.

make sure both pages are set to parallel.

you might need a check to lose HP as well.
 

rpgLord69

Regular
Regular
Joined
Oct 23, 2021
Messages
690
Reaction score
908
First Language
Finnish
Primarily Uses
RMMZ
Because you copied your event, the movement route is set on your original spikes. You need to change your movement routes to "this event" if you want to copy them without manually changing the move routes.
 

TheAM-Dol

Randomly Generated Christmas Festivities
Regular
Joined
Feb 26, 2022
Messages
1,178
Reaction score
2,201
First Language
English
Primarily Uses
RMMV
@rpgLord69 is correct.
If you want to be able to simplify this so that copy-pasting is easier, in the move-route drop down list of events, select "this event". Now whenever that move route is copied to a different event, it will only affect the event it has been copied to.

However, keep in mind you really, really don't want a lot of parallel events, so if you are copying the event a bunch of times for every single spike trap, then you are probably doing something wrong.

Off the top of my head, one way to simplify this down to 1 parallel event is to have a parallel event checking if the player is inside a specific region and run a variable timer.
You would mark this region where you have placed the spike traps. When the time is less than a value, turn on a switch that changes all events with the spike trap sprite to show the spikes and check if the player is in the region, if so, hurt the player. If the time is above that value have the switch turn off so that the spikes are retracted and do nothing but wait.
You could also change the switch to a variable to make the spike traps have 3 stages: Spikes fully retracted, spikes partially retracted, and spikes fully exposed. This mid stage - partially retracted - would help indicate to the player that the spikes are about to pop, so stay clear (kind of like the yellow light on a traffic stop). In this case the timer would first check if the timer variable is above a value, if so, set the variable controlling the spike images to be fully retracted. Then have the time check if the timer variable is between 2 values (less than this but more than that), and in that case set the spike image variable to show the partially retracted image. Then finally have the timer variable check if it's below a value. If so, change the spike image to being spikey, hurt the player if the player is in the region.

Something like that. I don't have RM in front of me to guide you more clearly. Maybe someone can provide clearer instructions if you need them.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,755
Reaction score
11,366
First Language
English
Primarily Uses
RMMV
I would suggest you consider restructuring this event.

1 - It's a parallel event with no Wait command on it, which you almost never want - you especially don't want multiple spike traps just like this cluttering up your map.

2 - It's relying on a variable that isn't even set by this event, HeroRegionID. That means you must have another parallel event running to set that. The two parallels may not occur in the correct order for this to work all the time.

3 - Because it's parallel, nothing is stopping the player from continuing to walk while you have that 30 frame wait before spikes start doing stuff, so it may not visually line up.

Incorrect use/overuse of parallel events is the primary cause of lag and poor performance in RPG Maker games.

I've seen another person or two have a setup that looks similar to this which uses some kind of constantly running parallel event getting the player's region ID and coordinates and stuff - I think recommended by a Driftwood video. That's a bad recommendation.

I don't see why this isn't simply a Player Touch trigger. There's no reason for any region IDs or parallel events to do this.
 

TheAM-Dol

Randomly Generated Christmas Festivities
Regular
Joined
Feb 26, 2022
Messages
1,178
Reaction score
2,201
First Language
English
Primarily Uses
RMMV
I don't see why this isn't simply a Player Touch trigger.
Actually, this is a good point.
I was under the assumption this was a spike trap the player needed to cross with timing. Like, for example, every 10 seconds the spikes pop out, so you have to cross the spikes before they jab ya.
But if it's just a perception thing that the player absolutely must not touch ever, then yeah, this should definitely be player touch.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,755
Reaction score
11,366
First Language
English
Primarily Uses
RMMV
I was under the assumption this was a spike trap the player needed to cross with timing.
It doesn't appear to be - the move route to extend the spikes is immediately followed by the player taking damage, so there isn't any kind of autonomous movement (which would still be better in the Autonomous Movement section, not a parallel event).
 

Latest Threads

Latest Posts

Latest Profile Posts

So in my SRPG, when kill monsters, they leave an aura that grants +20% Crit, +20% PDMG MDMG. Aura lasts only for 1 turn, it forces players when and where to last hit.

1702177938686.png
So frustrating when you just wanna work on your game but people want to do stuff in RL... :p
Day #9 of Advent is all ready in one spot! Do you prefer doing your shopping way before Xmas, or…do you like the chaos? Are you done shopping and/or crafting for Xmas?
Fast test with Wagon and horse no animation. yes it looks strange horse is Ralph and wagon is follower xDDDD
Should first boss be easy or maybe little medium, I don't want to be overwhelmingly hard

Forum statistics

Threads
136,887
Messages
1,271,060
Members
180,663
Latest member
brendancamarillo
Top