Chrono Engine ABS Mode: How do I keep projectiles from going through the walls?

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
I know this may be a foolish question to ask, but I want to know if there's a way to keep projectiles from going straight through walls and hitting enemies from the other side. I really don't know how I would implement this other than creating so many indestructible events that could block projectiles. Any help?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
529
Reaction score
275
First Language
thai
Primarily Uses
RMMV
just tick the through off from your skill event in tool map
note that it will stuck on the wall until it erase itself
I still can't find good solution to fix it
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
just tick the through off from your skill event in tool map
note that it will stuck on the wall until it erase itself
I still can't find good solution to fix it
Will ticking "Through" off make the arrows get stuck on water or something?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
529
Reaction score
275
First Language
thai
Primarily Uses
RMMV
Will ticking "Through" off make the arrows get stuck on water or something?
on every thing that player can't pass
and better than ask... just try it...
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
on every thing that player can't pass
and better than ask... just try it...
tried it and the projectile won't even move. Even the enemy projectiles are stuck.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Although I don't know how ABS works it should still be checking if movement succeeds, you can script call
Code:
$gameMap.event(this._eventId)._movementSuccess;
to check, if false then it bumped into something if it's not through.

Another thing you could do is
Code:
$gameMap.event(this._eventId).regionId();
then use specific regions to block things, so say region 50 check
Code:
$gameMap.event(this._eventId).regionId() === 50
If your walls are region 50 and it's true then it's in that region.
 
Last edited:

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Although I don't know how ABS works it should still be checking if movement succeeds, you can script call
Code:
$gameMap.event(this._eventId)._movementSuccess;
to check, if false then it bumped into something if it's not through.

Another thing you could do is
Code:
$gameMap.event(this._eventId).regionId();
then use specific regions to block things, so say region 50 check
Code:
$gameMap.event(this._eventId).regionId() === 50
If your walls are region 50 and it's true then it's in that region.
Oh? I thought about applying the passability to region, but I don't know how to apply it to events. do I just post this code on each projectile event and code the passability to switch off when it goes to a specific region ID?

I tried doing this and I got this error.

2020-04-07 (2).png
 
Last edited:

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Oh? I thought about applying the passability to region, but I don't know how to apply it to events. do I just post this code on each projectile event and code the passability to switch off when it goes to a specific region ID?
Well I don't know how you set up your events, but if they are parallel you can just make it a conditional script call with that code and if it's true then erase the event as it hit a wall region, can keep it through.
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Well I don't know how you set up your events, but if they are parallel you can just make it a conditional script call with that code and if it's true then erase the event as it hit a wall region, can keep it through.
These projectile events are not parallel, but they mainly use the chronoengine script.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
These projectile events are not parallel, but they mainly use the chronoengine script.
Ok I looked at it real quick and made a quick "patch".
Code:
var _mog_toolSys_gevent_updateSelfMovement = Game_Event.prototype.updateSelfMovement;
Game_Event.prototype.updateSelfMovement = function() {
    if (this.regionId() === 1) this.erase();
    if (this.needStopSelfMovement()) {return};
    _mog_toolSys_gevent_updateSelfMovement.call(this);   
};
replace that in the code with that and change regionId number to whatever, no idea if there's any problem but testing the arrow shooting it disappeared, also makes the sword disappear, but you're swinging at a wall I guess, no idea if it stops the damage.
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Ok I looked at it real quick and made a quick "patch".
Code:
var _mog_toolSys_gevent_updateSelfMovement = Game_Event.prototype.updateSelfMovement;
Game_Event.prototype.updateSelfMovement = function() {
    if (this.regionId() === 1) this.erase();
    if (this.needStopSelfMovement()) {return};
    _mog_toolSys_gevent_updateSelfMovement.call(this);  
};
replace that in the code with that and change regionId number to whatever, no idea if there's any problem but testing the arrow shooting it disappeared, also makes the sword disappear, but you're swinging at a wall I guess, no idea if it stops the damage.
Fixed! Not only did the bullet disappear, but the enemy doesn't get damaged on the other side!
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Fixed! Not only did the bullet disappear, but the enemy doesn't get damaged on the other side!
Here's a fix incase you want events inside said regions to not be erased and only tools
Code:
if (this._tool.enabled && this.regionId() === 1) this.erase();
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Here's a fix incase you want events inside said regions to not be erased and only tools
Code:
if (this._tool.enabled && this.regionId() === 1) this.erase();
Will do! thank you!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Where do i have to play Heisei Pistol Show the same creator that made Re: Kinder Parun
I really get the feeling I should be doing regular YouTube videos whenever I make something cool in my game, instead of waiting for massive changes. But not going to lie... I always feel like it's never quite enough to merit an update, until it's a drastic change. :kaoswt:
Going to submit to this game jam...struggling with the time crunch...
Have to keep compromising...
Just released a new OST for my game and a new place to purchase it!

Ah, things to do when you finish a game.
Ami
Me: It's dark cloudy! I hope it's Rain…
(2-3 Hours Later,Changed To Sunny)
Me: :kaolivid:

Forum statistics

Threads
104,540
Messages
1,007,016
Members
136,034
Latest member
WhatisGachi
Top