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

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
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
528
Reaction score
220
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
47
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
528
Reaction score
220
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
47
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
47
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
47
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
47
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
47
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 Posts

Latest Profile Posts


It's my cute little ghost~
Minecraft Dungeons is a great example of a game that's much simpler than other games in its genre but almost as equally immersive and fun to play. Lotta RPGmaker devs could learn from that lesson.
Well, it's been a while since the last time I came here... Is there a JS scripting FAQ? I'd like to know what it's capable of achieving, and how :rswt
I love the Time Fantasy tiles, but haven't played anything made with it yet. Can anyone recommend me something?
Vote for what I show more indepth on Twitter tomorrow from the MZ default resources

Forum statistics

Threads
99,373
Messages
964,558
Members
130,981
Latest member
jimmydark
Top