- Joined
- Apr 24, 2021
- Messages
- 322
- Reaction score
- 73
- First Language
- English
- Primarily Uses
- RMMV
Hello everyone. I'm using YEP spawn plugin to spawn bombs in the map on the player position.
I'd like to event the following:
- when the player is in 3 tiles radius from the bomb when it explodes --> damage animation
- when a given event (breakable wall or other) is in 3 tiles radius from the bomb --> turn switch on
Given the bomb is spawned, I won't know exactly what will be the event number relative to the bomb (for conditional branch of checks). I'd need something like: a comment tag or event note which acknowledge that it's breakable.
That is because multiple bombs can exist at once.
Here is the bomb eventing like: Parallel event
Animation flash
wait 3 frames
Animation flash
wait 3 frames
....
Animation flash
wait 3 frames
SE: Break
Animation: Explosion
Erase event
What do you suggest?
I can make the single bombs to check if the player is within 3 tiles by x and y player position, but what about wallet and breakable events?
This is where I'm now:
var ev = $gameMap.event(this._eventId);
var pl = $gamePlayer;
var rx = pl.x - ev.x;
var ry = pl.y - ev.y;
var pdir = (pl.direction() / 2) - 1;
var check = [ry==-1, rx==1, rx==-1, ry==1];
check = (rx==0 || ry==0) && check[pdir];
$gameSelfSwitches.setValue([this._mapId, this._eventId, 'A'], check);
I'd like to event the following:
- when the player is in 3 tiles radius from the bomb when it explodes --> damage animation
- when a given event (breakable wall or other) is in 3 tiles radius from the bomb --> turn switch on
Given the bomb is spawned, I won't know exactly what will be the event number relative to the bomb (for conditional branch of checks). I'd need something like: a comment tag or event note which acknowledge that it's breakable.
That is because multiple bombs can exist at once.
Here is the bomb eventing like: Parallel event
Animation flash
wait 3 frames
Animation flash
wait 3 frames
....
Animation flash
wait 3 frames
SE: Break
Animation: Explosion
Erase event
What do you suggest?
I can make the single bombs to check if the player is within 3 tiles by x and y player position, but what about wallet and breakable events?
This is where I'm now:
var ev = $gameMap.event(this._eventId);
var pl = $gamePlayer;
var rx = pl.x - ev.x;
var ry = pl.y - ev.y;
var pdir = (pl.direction() / 2) - 1;
var check = [ry==-1, rx==1, rx==-1, ry==1];
check = (rx==0 || ry==0) && check[pdir];
$gameSelfSwitches.setValue([this._mapId, this._eventId, 'A'], check);
Last edited: