Status
Not open for further replies.

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
207
Reaction score
153
First Language
Danish
Primarily Uses
RMMV
When I shoot using Moghunter's Chrono plugin (ABS) then the bullet go through walls. Is there a way to fix that, so when the bullet hit a wall then it disappears?
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,586
Reaction score
1,347
First Language
Dutch
Primarily Uses
RMMV
yes and no, depends if you want it easy or harder, while the main base
of chrono engine doesn't have it, you can either edit the code, or add
an event to check if the bullet hits a region to dissapear, or something as a fake
destruction object with x HP on it without showing the the HP of it like enemies.

there might be other works around, but I dont know how you want to deal with those.
 

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
207
Reaction score
153
First Language
Danish
Primarily Uses
RMMV
@ShadowDragon I did try to edit the code with a code I found on here, but the only result I got was that now nothing happens when I try to shoot.

This is the code I found:

var _mog_toolSys_gevent_updateSelfMovement = Game_Event.prototype.updateSelfMovement;
Game_Event.prototype.updateSelfMovement = function() {
if (this.regionId() === 5) this.erase();
if (this.needStopSelfMovement()) {return};
_mog_toolSys_gevent_updateSelfMovement.call(this);

I don't mind edit the code.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,586
Reaction score
1,347
First Language
Dutch
Primarily Uses
RMMV
I think you need to do this: if (this.regionId() === 5) {this.erase()};

which you forgot, but while my JS is not the best, I didn't deal with
other plugins modifications, if I don't know what each function will do.

there are parts that I try to learn and understand, which some functions need
to call in another function to work correctly, so I cant help you really on modifify
the plugin in a specific way.

some can edit it like that, if the tileNumber is 2, than it will erase, or if it's 1, but
other plugins might use this function as well, like YEP_SlipperyTiles if not mistaken,
every tile tag with number x are slippery, but regions can also be used.
while tiles can have numbers 0- 7 (0 default), 1-7 are mostly open for things.
if you really want to modify the code, than a coder might be able to help you with it.
 

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
207
Reaction score
153
First Language
Danish
Primarily Uses
RMMV
That doesn't work either...I tried to turn off all plugins except Moghunter's and Yanfly's core and messenger plugin, but didn't work. My knowledge in coding is very basic.

I don't mind fixing the issue some other way. You mentioned using an event to check if the bullet hit a region then it disappears. Do you know how to do that?
 

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
207
Reaction score
153
First Language
Danish
Primarily Uses
RMMV
@ShadowDragon Never mind, I made it work! I tried the code again and changed the one you gave me...again and now it works. I must have done something wrong before.

Anyway...thanks for your help!

**Forgot to edit my last reply instead of replying like this, sorry!**
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,260
Reaction score
5,434
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Time to wear a new face again...

Should keep things interesting huh? @EpicFILE :p
unknown.png

Been feeling that my characters spent too much time exploring caves, so I figured it was time to explore abandoned keeps instead.
Did you had some minor hitches with RMMZ? Come report to my topic where I did the same! [Just another rant from a RM veteran + Suggestions and Solutions] All opinions are welcome!
Squashing some bugs before releasing plugin :LZScool:The testing phase is taking more time than what I expected...

Forum statistics

Threads
110,327
Messages
1,052,368
Members
143,367
Latest member
Zainhen
Top