Help - Search - Members - Calendar
Full Version: Explosive events
RPG RPG Revolution Forums > Scripting > Event Emporium > Eventing Tutorials
Alt_Jack
Guess what? I've returned with more ways to blow things up in your game (and no demos of them). This is what happens when you drift from the "nerds/geeks" to the "bad kids". Anyways, let's begin:

plant a C4

Let's say you want to blow up a jamming device or something.
create 2 items, an explosive and a detonator
stick a blank "push to activate" event in front of the target.
>condition branch-if C4 is in inventory (else - text: I need a C4 to blow this up! )
have the event itself move to where you want the bomb to go (to save making another event). You can use "set event location" or "set move route"; the latter requries you to turn Through ON (then off after) to get it there, but you'll need to access this menu anyway to change the graphic to your bomb.
remove the bomb from your inventory and add the detonator
attach a common event to the detonator (via the item edit menu) that turns on a switch. You could probably make one called "bomb".
create a parallel process that has the condition branch "if switch Bomb is ON, play (explosion) animation on your bomb event that you just planted. If the parallel process is built into the event, just have it erase itself (and the detonator). If not, have it turn transparent and turn Through ON, so you won't see it and can walk through it, or move it some place else.
As for what you blew up, that's up to you.

Or, conversely
disarm the bombs

The evil (insert villain name) has planted bombs...er...somewhere and it's up to (insert hero's name) to diffuse them in time!
Fair warning: this involves a timer, so test it out a few times to make sure there's enough time to disarm all the bombs. We'll say there's 4.
Start up a timer however you want
make a variable called "bombs". This'll keep track of how many bombs you've diffused.
if you're lazy, use the "quick event creator" to make a chest (to represent your bomb). At the end of the 2nd event page (remove the item adding function, too) put " control variable Bombs Add 1". You can make a text box that says "Great job, \N[1] ! Now there are only \V[1] bombs left!" The N1 is whatever character #1's name is (default is Ralph) and V1 is variable 001; neither has to be 1. Set move route to "Through ON"
make a parallel process event that has the condition branch if variable Bombs = 4 (cuz we said there would be 4), stop timer.
Finally, make another parallel process event that actuall blows you up; condition: timer 0 min 1 sec or less, game over, return to Title screen, -End

These should work; if not, let me know. You can also combine aspects of the two to make a time bomb, instead of a C4.
Alt_Jack
Landmines. It's probably been done a thousand + times, but hey let's do it again. Besides, my exploding chest event is already in the VX tutorials.
landmines

create a player touch event, stick it somewhere unassuming
have it play the animation Fire 1, which is quite the blast of fire
subtract HP from someone (or everyone)
have the player walk or jump backwards (afterall, they just got blown up)
erase the event

Now the catch; we'll make something that will show where the mines are. It can also be used like the Item Finder in Pokemon.
minesweep'r

create a switch and a parallel process
make a condition branch wherein when the switch is on, use the move route command to change the graphic of the mines, so that they aren't just blank (and therefore invisible) events
Paper PokéMaster
I have a similar event to the Minesweep'r that's a parallel common event.

It checks to make sure a character's in your party. Then it checks if you're holding a button.

If all that's true, then it turns on a switch that goes off when you release the button.

Then I have events that I want all this to detect have another event page that's just a bubble or sparkle or something.

happy.gif
Alt_Jack
Snazzy.
I might just try and figure out the coding for that, but probably not. Mind you, there's a demo in the event submissions for RPG XP that features an explosive event that I'd like to take a look at, but my computer doesn't like those files.
I think it'd be neat to make a proxy mine/device.
Alt_Jack
So I figured out how to make proximity mines. You'll need a whole bunch of stuff, though. And it'd be nice if someone could tell me how you can put stuff from your inventory on the map as an event.
The tricky part is the sensor. It moves around in a "circle" ; hence there's a slight glitch where if you get the timing right, you can run past it into (then out of) the center of the circle. So just put the mine itself in the center of the circle.
proxy mine

parallel process event with a 4X faster speed on the highest frequency and a custom move route that reads like this.
change speed: 6
change freq: 5
turn 90 LEFT
1 step backward
move up
move right
move right
move down
move down
move left
move left
That'll make the event move in a 3 X 3 "circle"
now to set the event's location relative to your own
Control variables [ PX ] = players map x
control variables [ PY ] = player's map y
control variable [eX ] = this event's map X
control variable [ eY ] = this event's map Y
conditional branch: variable [ PX ] = = variable [ eX ]
>conditional branch variable [ PY ] = = variable [ eY ]
>show animation player (some kind of explosion)
change HP, (someone), XXX
erase event

You can use this for both players and enemies, but you need to select the target and give events their own map coordinate variables.
For the mine in the middle, just have the old "player touch/explosion/damage/erase" formula. Or you can do like they have in Star Wars: Republic Commando (which inspired most of these) and give the player the opportunity to disarm the mine by dodging the sensor sweep. Or slow the player down with something like:
QUOTE
autorun-text "mines?! we'll have to go slow and careful"- set move route-player speed half

So that they can't outrun/dodge the signifacantly faster sensor.
Alt_Jack
Today's explosive device is....trip-wire! laugh.gif
What is a "trip-wire"? Well, it's a wire (or laser beam) that's tied between 2 points (usually sides of a doorway) to trip someone (or set off an alarm, or blow them up). Admittedly, it's a bit of a recycle from the proxy mine, but simpler. In this case, we'll make it a laser tripwire across a doorway.

You'll probably need 2 events: 1 for the projector, 1 for the beam.
the projector goes on the wall, the beam event goes in the space between the walls/doorway. You can have some shut off/erase business with the alarm, but we'll skip that (I'm sick of talking about that). The beam will be a parallel process; the custom movement route, you set it to go back and forth as fast/often as possible (since it's likely only 2 squares, it'll be pretty fast). Create a 2nd event page for it, but have it as player-touch (you don't need a move route). What goes in the event box is the consequence of tripping it (alarm, explosion,etc).

At this point, I think I've covered just about every explosive device I can think of. sweat.gif
Feldschlacht IV
YES EXPLOSIONS
Alt_Jack
QUOTE (Feldschlacht IV @ Sep 10 2010, 09:10 AM) *
YES EXPLOSIONS

Hey, anyone can make an explosion. It's how you rig the device that gets you the ladies. wink.gif

EDIT: I was going to make one for volcanic eruptions, but I find myself lacking the time to fix the bugs it had. dry.gif
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.