Imperial_Steele

Villager
Member
Joined
Aug 22, 2021
Messages
14
Reaction score
6
First Language
English
Primarily Uses
RMMV
So I've set up an event where the player sets a bomb to remove a boulder to open a path to access a side-area. I've got the timing and special effects down pretty well. I thought it would be fun to give the player 3 seconds to run and hide so that the exploding boulder doesn't damage them.

However, that last sentence is where I've run into ALL the snags! If I do "wait" for 3 seconds, the player cannot move! And then the boulder explodes in their face! =O If I try to make it a parallel event, then the first sentence in the event plays over and over as soon as I enter the cave and I cannot move (My hard rock is causing a soft lock, heh!)

I haven't bothered adding damage yet, as, it would currently be unfair if I cannot get this sorted, but I feel like I may need help with that, too (wondering if there's a max radius for the remove HP command).

I mean, I guess I can not worry about the damage and just take control of the PCs and make them run away, but a) that's not fun for the player and b) I'm not 100% sure how to do that, either!

Any tips or ideas are appreciated!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,994
Reaction score
3,170
First Language
English
Primarily Uses
RMMV
You should post what you have for your event code, as we can't really help you fix it if we don't know what you have :wink:
That being said, a correctly-written parallel event can achieve this.
If I try to make it a parallel event, then the first sentence in the event plays over and over as soon as I enter the cave
Have you done some tutorials on writing events for MV? Using the event pages is a basic beginning - events always resolve the highest-numbered page that meets the conditions set in the upper-left hand side of the page.

So the parallel event that counts down and explodes would be set to a parallel event on page 2 that has a self-switch condition. When you first enter the map, that switch won't be on, so the engine continues down to page 1, where you just have the boulder they need to interact with.

You make that little scene of setting the bomb conclude with setting the self-switch, which will activate the page with the parallel event timer. Then, the explosion concludes with setting a second self-switch, which will satisfy the condition for page 3, which is blank (or a picture of rubble, or whatever you want).
 

Imperial_Steele

Villager
Member
Joined
Aug 22, 2021
Messages
14
Reaction score
6
First Language
English
Primarily Uses
RMMV
Ah! I was trying to cram everything onto one page; didn't occur to me to use a self-switch and make a second page anywhere!

I did the built-in tutorial and have messed around a bit here and there (this whole thing with blowing up a boulder is just that, messing around), but I'll split it into pages; thanks!
 

Attachments

  • TNT.jpg
    TNT.jpg
    109.8 KB · Views: 6

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,994
Reaction score
3,170
First Language
English
Primarily Uses
RMMV
I did the built-in tutorial and have messed around a bit here and there (this whole thing with blowing up a boulder is just that, messing around), but I'll split it into pages; thanks!
I suggest following a tutorial series all the way through, making a sample game with it to practice the skills. I like Echo607's, but SRDude and DriftWood and LevelUp and a bunch of other people have series on YouTube.

As far as your event, you'd have the TNT removal followed by the setting of the self-switch. Then have your parallel process start with the Wait command (which should not interfere with your movement inside of a parallel event). Then you can do some conditionals checking the placement of the party.

To do that, you'll have to use Control Variables -> Game Data -> Character -> Map X and Map Y to set two variables to the coordinates of the player, then use those in conditionals to see if they're far enough away from your explosion - if not, Change HP on those suckers.
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
525
Reaction score
1,536
First Language
Indonesia
Primarily Uses
RMMV
Regarding the distance check.
This is my personal code to measure the distance between player and event:
Code:
var pl = $gamePlayer;
var ev = $gameMap.event(this._eventId);
var rx = pl.x - ev.x;
var ry = pl.y - ev.y;
var check = Math.abs(rx+ry) < DISTANCE;
$gameSelfSwitches.setValue([this._mapId, this._eventId, 'B'], check);
Change DISTANCE to number in tile distance where the player is safe from the explosion.

And this is how you implement it on your event after setting up the bomb timer in parallel process page like mentioned above:
Page 1
1629870580072.png

Page 2
1629871013091.png

Change that <3 condition to any number you need to define the explosion range.
Turn off both self-switches to make the event reusable.
Tested and worked as intended.

Additionally you might want to use custom movement to create ticking bomb sound effect for aesthetic on page 2.
1629871524415.png
 

Latest Threads

Latest Profile Posts

Wheel of Attacks.png

MORE GAMBLING THEMED ATTACKS!

I AM UNABLE TO STOP!
Is it ok to repost stuff that i've posted to threads in the status feed?
If so, here's art of Shiloh, the main protagonist of the game i'm making:20220807_181702.jpg
They are meant to be ambiguous in gender, like Frisk from Undertale or Gogo from FFVI. I haven't decided what their age will be yet. Any ideas?
Please comment what you think about the art and design!
ScreenShot_8_10_2022_7_15_21.png
Looks like Mike's got a new party member in Robbi...

Calf survival story with a happy ending.
well here's that concept art!
WIN_20220812_16_53_56_Pro (2).jpg
Whaddya think? Name suggestions?

Forum statistics

Threads
124,457
Messages
1,163,810
Members
163,278
Latest member
dreadegen16
Top