Help - Search - Members - Calendar
Full Version: Spike event
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion
drei7717
How can I make a spike event that hurts you when the spike comes up then transfers you back to the beginning of the map?
Sakura Phoenix
I'm going by what I've done in XP, I'm not sure how different VX is...
(slightly repaste from another eariler question about spikes)

Have a switch and have a parallel processing seperate event in a corner that say waits a few frames, plays an SE and turns let's call it [001Spike Safety] switch on, then waits a few frames and turns it off.

Then for each spike event you have, set it up with two pages/tabs. One with the spikes up, and have the trigger on player touch so that if the player touches it, it'll give them damage or whatever you have planned on the first page{in my case I sent them back to the begining of the dungeon/area with a transfer but whatever you want works]. On the second page with the condition if [spike safety switch is on] the graphic with the switches down and nothing else on the event page.

If that works let me know so in the future I can be certain for VX users on how to help them out with that question.
myperson54
I've done something very similar by taking a door, changing the graphics to 1-holes and 2-full spikes from the rtp, then adding some damage and knockback lines. Sorry, been a while since I used it.
drei7717
QUOTE (Sakura Phoenix @ Mar 10 2012, 03:24 PM) *
I'm going by what I've done in XP, I'm not sure how different VX is...
(slightly repaste from another eariler question about spikes)

Have a switch and have a parallel processing seperate event in a corner that say waits a few frames, plays an SE and turns let's call it [001Spike Safety] switch on, then waits a few frames and turns it off.

Then for each spike event you have, set it up with two pages/tabs. One with the spikes up, and have the trigger on player touch so that if the player touches it, it'll give them damage or whatever you have planned on the first page{in my case I sent them back to the begining of the dungeon/area with a transfer but whatever you want works]. On the second page with the condition if [spike safety switch is on] the graphic with the switches down and nothing else on the event page.

If that works let me know so in the future I can be certain for VX users on how to help them out with that question.

It works, but when I'm already on the event before spikes, then it spikes, it doesn't hurt me. It will only hurt me when I get off the spike then toucj it myself

Idk if that makes sense lol

EDIT: If found out a way to do it but I think there's an easier way to do it because I'm going to have alot of spikes in my game lol but this what I put.

Event 1 page 1: Wait 120 frames
Control Switches [Trap] = ON

Event 1 page 2: Control Variables [Playerx] = Player's Map X
Control Variables [Playery] = Player's Map Y
Control Variables [Spikex] = Player's Map X
Control Variables [Spikey] = Player's Map Y
Conditional Branch Variable [Playerx] = [Spikex]
Conditional Branch Variable [Playery] = [Spikey]
Show Animation Spike
Wait 60 frames
Transfer blah blah blah

Else

Branch End
Else

Branch End
Wait 120 Frames
Control Switches [Trap] = OFF

Spike Event page 1: Spike down sprite
Spike Event page 2: Spike up sprite check control switch [trap] is ON

You think there's an easier way to do this?
Sakura Phoenix
Try an event touch then, instead of player touch.
drei7717
QUOTE (Sakura Phoenix @ Mar 10 2012, 04:04 PM) *
Try an event touch then, instead of player touch.

Same thing happens lol
Sakura Phoenix
That'd work too, the player variables bit, I don't have that problem myself in XP. If I'm on top of the spike when it comes up it sends me to the point of transfer.

With keeping track of player's X's and Y's it makes it more complex, with the way I've done it, I can just copy paste the spikes over and over as much as I like with no set variables involved.
Kaust
I had a little struggle with this when I tried it on VX so heres a few screens that'll hopefully help.
Click to view attachment
Doing it this way also allowed me to create alternating spikes which really upped the ante happy.gif
Sakura Phoenix
Yes, that is something else, keeping the same parallel processing event all you have to do is reverse the tab order on another spike event and copy paste them alternatively or if you want to trip up the player, after a pattern of alternating spikes suddenly throw in three of the same type.
drei7717
I have another question. I have a lot of active spike events in one map and the game lags terribly. Is there a way to prevent that?
Kaust
How many do you have? Its typically a lot of autoruns or parallel processes that lag a map (and I mean a lot because my world map runs fine so I imagine its something else causing your lag), or a couple of contradicting ones essentially versing one another for control.
I've always used small maps and never had a problem (...except once with my bigger world map), is there really any reason a big map could not be broken down into smaller maps? That'll be a nice easy way to prevent lag.
You can also search the script section for antilag scripts. I know they worked for some people but not me, and really the less scripts you have to use early on the better.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.