Event that go throught player but collide with everything else

DarielZer0

Villager
Member
Joined
Oct 16, 2021
Messages
27
Reaction score
8
First Language
Spanish
Primarily Uses
RMMV
i want to make a event that collide with other events and walls but go throught the player. it's possible?
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,401
Reaction score
852
First Language
Poland
Primarily Uses
RMMV
Yes. It's possible, but there are two major questions before implementing such feature:

#1 Does player can interact with that event later?
#2 Are there more than 1 such events on map?

If there is only one event you want to apply then you need to create an empty parallel event on map and in Script... option paste this code:
Code:
this._px = $gamePlayer._x; //Get X position of player
this._py = $gamePlayer._y; //Get Y position of player
this._ex = $gameMap.event(eventId).x; //Get X of your specific Event
this._ey = $gameMap.event(eventId).y; //Get Y of your specific Event

then in event you need to use Conditional branch and in 4th tab select Script and type:
Code:
$gameMap.distance(this._px, this._py, this._ex, this._ey) <= 1
Remember to check option Create Else Branch and below Script type:
Code:
$gameMap.event(eventId)._through = true;
and finally below Else type
Code:
$gameMap.event(eventId)._through = false;

Remeber to keep this event parallel otherwise it won't trigger.

Whole empty event should look like this:
xO3LjHt.png


(in place of number 99 and eventId you put ID of your event you want to make it through player, but collide with everything else.
 
Last edited:

DarielZer0

Villager
Member
Joined
Oct 16, 2021
Messages
27
Reaction score
8
First Language
Spanish
Primarily Uses
RMMV
Yes. It's possible, but there are two major questions before implementing such feature:

#1 Does player can interact with that event later?
#2 Are there more than 1 such events on map?

If there is only one event you want to apply then you need to create an empty parallel event on map and in Script... option paste this code:
Code:
this._px = $gamePlayer._x; //Get X position of player
this._py = $gamePlayer._y; //Get Y position of player
this._ex = $gameMap.event(eventId).x; //Get X of your specific Event
this._ey = $gameMap.event(eventId).y; //Get Y of your specific Event

then in event you need to use Conditional branch and in 4th tab select Script and type:
Code:
$gameMap.distance(this._px, this._py, this._ex, this._ey) <= 1
Remember to check option Create Else Branch and below Script type:
Code:
$gameMap.event(eventId)._through = true;
and finally below Else type
Code:
$gameMap.event(eventId)._through = false;

Remeber to keep this event parallel otherwise it won't trigger.

Whole empty event should look like this:
xO3LjHt.png


(in place of number 99 and eventId you put ID of your event you want to make it through player, but collide with everything else.
i already did something similar to this,only that i did it with variables but the result is almost the same,when i am 1 grid of distance the event go through everything and since it moves in ramdom directions sometimes it get stuck in a wall or another event,and also there are multiple events of this kind in the map
 

Latest Threads

Latest Posts

Latest Profile Posts

Marketing seems to be about reducing dependence on luck to sell a product, as well as expanding the number of avenues in which luck can play a role in selling a product.
So, I've been wanting to do this randomized logic puzzle in my game for years now. I finally figured out how to do it by using arrays and a few small script calls. It's based on the Einstein Fish Puzzle! :D Though, I have no idea how to actually have the player put in answers.... might start a thread about it.

The projectiles shown in this video are as follows:
1, Basic Triple
2, 30-Degree Arc
3, Randomized Blast Wave
4, 8-way
5, 8-way Double
6, 8-way Slowness
7, 120-Degree Arc Repetitive
8, Projective Triple
9, Split 8-way
10, 2-way Split Randomized Arc
11, HP-MP Split Arc
12, Split Laser
13, Shock
14, Cosine
Drop shadows and water reflections tests in RPG Maker VX Ace


BgI3F80.png
I'm doing a fairy tale project Little Red Riding Hood and the Woodsman. I'm almost done with the demo in my native language and I intend to make a demo version in English as well. I'm just going to use the translator because I don't know the pronunciations very well, I only know how to say "Hey" and nothing else.. :kaoswt2:

Forum statistics

Threads
118,620
Messages
1,117,400
Members
155,705
Latest member
Steve7654
Top